Skip to content

Commit

Permalink
Rework how we ignore changes in CI (#345)
Browse files Browse the repository at this point in the history
This is based on how we do things in
[libxmtp](https://github.com/xmtp/libxmtp/blob/main/.github/workflows/test-http-api.yml)

There are two major changes:
- always run all tests in `main`
- be more deliberate about ignoring node tests in some scenarios
  • Loading branch information
mkysel authored Dec 19, 2024
1 parent 70ede3f commit fa5f450
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/lint.yml → .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ on:
push:
branches:
- main
paths-ignore:
- "contracts/**"
pull_request:
paths-ignore:
- "contracts/**"
paths:
- ".github/workflows/lint-go.yml"
- "pkg/**"
- "cmd/**"
- "dev/**"
- "go.mod"
- "go.sum"
- "tools.go"
- ".golangci.yaml"
permissions:
contents: read
jobs:
lint:
name: Lint
lint-go:
name: Lint-Go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: shellcheck
run: |
sudo apt-get -y install tree
dev/lint-shellcheck
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/lint-spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint Spellcheck
on:
push:
branches:
- main
pull_request:
paths:
- ".github/workflows/lint-spellcheck.yml"
- "dev/**"
jobs:
lint-spellcheck:
name: Lint Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: shellcheck
run: |
sudo apt-get -y install tree
dev/lint-shellcheck
3 changes: 1 addition & 2 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on:
push:
branches:
- main
paths:
- "contracts/**"
pull_request:
paths:
- "contracts/**"
- ".github/workflows/solidity.yml"

concurrency:
group: ci-solidity-${{ github.ref }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ on:
push:
branches:
- main
paths-ignore:
- "contracts/**"
pull_request:
paths-ignore:
- "contracts/**"
paths:
- ".github/workflows/test.yml"
- "pkg/**"
- "cmd/**"
- "dev/**"
- "go.mod"
- "go.sum"
- "tools.go"
jobs:
test:
name: Test (Node)
Expand Down

0 comments on commit fa5f450

Please sign in to comment.