Skip to content

Commit

Permalink
Problem: file changes detection in workflow is problematic (backport c…
Browse files Browse the repository at this point in the history
…rypto-org-chain#703)

* Problem: file changes detection in workflow is problematic

Solution:
- fix wildcards according the plugin's doc
- reformat python

* fix py-lint
  • Loading branch information
yihuang committed Sep 20, 2022
1 parent c34a372 commit 2a80ff5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ jobs:
gomod2nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v29.0.2
with:
Expand Down Expand Up @@ -95,7 +97,9 @@ jobs:
contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v29.0.2
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v29.0.2
with:
files: |
docs/**.md
docs/**/*.md
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.13
if: steps.changed-files.outputs.any_changed == 'true'
with:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ jobs:
name: Lint python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v29.0.2
with:
files: |
**/poetry.lock
**/pyproject.toml
**.py
**/*.py
- uses: cachix/install-nix-action@v15
if: steps.changed-files.outputs.any_changed == 'true'
- uses: cachix/cachix-action@v10
Expand All @@ -63,12 +65,15 @@ jobs:
name: Lint nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v29.0.2
with:
files: |
**.nix
*.nix
**/*.nix
- uses: cachix/install-nix-action@v15
if: steps.changed-files.outputs.any_changed == 'true'
- run: nix-shell -I nixpkgs=./nix -p nixpkgs-fmt --run "make lint-nix"
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ jobs:
integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v29.0.2
with:
files: |
docs
**.md
*.md
**/*.md
- uses: cachix/install-nix-action@v15
if: steps.changed-files.outputs.only_changed == 'false'
- uses: cachix/cachix-action@v10
Expand Down Expand Up @@ -54,13 +57,16 @@ jobs:
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v29.0.2
with:
files: |
docs
*.md
**/*.md
- uses: cachix/install-nix-action@v15
if: steps.changed-files.outputs.only_changed == 'false'
- uses: cachix/cachix-action@v10
Expand Down

0 comments on commit 2a80ff5

Please sign in to comment.