Skip to content

Commit

Permalink
chore: prevent running CI when unnecessary
Browse files Browse the repository at this point in the history
Example -> gnolang#134
  • Loading branch information
moul committed Apr 22, 2022
1 parent affa8e2 commit 7cb43db
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Build

on:
pull_request:
paths:
- "**.go"
- "**.gno"
- "go.mod"
- "go.sum"
- ".github/workflows/build.yml"
push:
branches:
- master
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Tests

on:
pull_request:
paths:
- "**.go"
- "**.gno"
- "go.mod"
- "go.sum"
- ".github/workflows/unit-tests.yml"
- "Makefile"
push:
branches:
- master
Expand All @@ -14,16 +21,11 @@ jobs:
matrix:
goversion: ["1.17.x", "1.18.x"]
args:
- ./tests/*.go -test.short -run "TestFileStr|TestPackages|TestSelectors" --timeout 20m
- ./tests/*.go -test.short -run "TestFiles1" --timeout 20m
- ./tests/*.go -test.short -run "TestFiles2" --timeout 20m
- ./tests/*.go -run "TestFiles/^zrealm" --timeout 20m
- ./tests/*.go -run "TestFiles1/^zrealm" --timeout 20m
- ./tests/*.go -run "TestFiles2/^zrealm" --timeout 20m
- ./tests/*.go -run "TestPackages" --timeout 20m
# temporarily disable the pkgs/... tests because some tests are flappy and
# we need to choose a good strategy to manage them.
# - ./pkgs/... -p 1 -count 1 --timeout 20m
- test.go
- test.files1
- test.files2
- test.realm
- test.packages
runs-on: ubuntu-latest
timeout-minutes: 21
steps:
Expand All @@ -32,4 +34,4 @@ jobs:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: test
run: go test ${{ matrix.args }}
run: make ${{ matrix.args }}

0 comments on commit 7cb43db

Please sign in to comment.