Skip to content

Commit

Permalink
Merge pull request #14660 from barrettj12/gh-actions-paths
Browse files Browse the repository at this point in the history
#14660

Most of the tests should only run when a Go file or go.mod changes. I've updated the paths that trigger each test, so we don't get full test runs on PRs like #14637.
  • Loading branch information
jujubot authored Sep 28, 2022
2 parents 729bfa2 + 10f8544 commit d7203d2
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 42 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
name: "Build"
on:
push:
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/build.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/build.yml'
workflow_dispatch:

permissions:
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/client-tests.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
name: "Client Tests"
on:
push:
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/client-tests.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/client-tests.yml'
workflow_dispatch:

permissions:
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/gen.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
name: "Generate"
on:
push:
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/gen.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'acceptancetests/**'
- 'doc/**'
- 'snap/**'
- 'testcharms/**'
- 'testing/**'
- 'tests/**'
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/gen.yml'
workflow_dispatch:

permissions:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
name: "Smoke"
on:
push:
paths:
- '**.go'
- 'go.mod'
- 'snap/**'
- 'testcharms/**'
- 'tests/main.sh'
- 'tests/includes/**'
- 'tests/suites/smoke/**'
- '.github/workflows/smoke.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.go'
- 'go.mod'
- 'snap/**'
- 'testcharms/**'
- 'tests/main.sh'
- 'tests/includes/**'
- 'tests/suites/smoke/**'
- '.github/workflows/smoke.yml'
workflow_dispatch:

permissions:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
name: "Snapcraft"
on:
push:
paths:
- '**.go'
- 'go.mod'
- 'snap/**'
- '.github/workflows/snap.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.go'
- 'go.mod'
- 'snap/**'
- '.github/workflows/snap.yml'
workflow_dispatch:
permissions:
contents: read
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
name: "Static Analysis"
on:
push:
paths:
- '**.go'
- 'go.mod'
- '**.sh'
- '**.py'
- '.github/workflows/static-analysis.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.go'
- 'go.mod'
- '**.sh'
- '**.py'
- '.github/workflows/static-analysis.yml'
workflow_dispatch:
permissions:
contents: read
Expand Down

0 comments on commit d7203d2

Please sign in to comment.