Skip to content

Commit

Permalink
chore: deps 9-18 & filter CI (#319)
Browse files Browse the repository at this point in the history
all deps into one and some CI filtering.
  • Loading branch information
Zeeshan Lakhani authored Sep 19, 2023
1 parent 48a790e commit 4463050
Show file tree
Hide file tree
Showing 15 changed files with 226 additions and 64 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,32 @@ env:
RUSTC_WRAPPER: "sccache"

jobs:
coverage:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
rust: ${{ steps.filter.outputs.rust }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
rust:
- '**/Cargo.*'
- '**/src/**'
- '**/tests/**'
- '**/config/**'
- '**/build.rs'
- '**/migrations/**'
- '**/fixtures/**'
coverage:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Setup IPFS
uses: ibnesayeed/setup-ipfs@master
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:

# https://github.com/docker/setup-qemu-action
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

# https://github.com/docker/setup-buildx-action
- name: Setup Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: "--debug"

- name: Docker Build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,26 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
nix: ${{ steps.filter.outputs.nix }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
nix:
- 'flake.nix'
- 'flake.lock'
run-checks:
needs: changes
if: ${{ needs.changes.outputs.nix == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,37 @@ env:
RUST_BACKTRACE: short

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
examples: ${{ steps.filter.outputs.examples }}
rust: ${{ steps.filter.outputs.rust }}
deny: ${{ steps.filter.outputs.deny }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
examples:
- 'examples/**'
rust:
- '**/Cargo.*'
- '**/src/**'
- '**/tests/**'
- '**/config/**'
- '**/build.rs'
- '**/migrations/**'
- '**/fixtures/**'
deny:
- 'deny.toml'
run-checks:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.examples == 'true' }}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
Expand Down Expand Up @@ -75,6 +105,8 @@ jobs:
run: cargo build --workspace --release

run-deny:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.examples == 'true' || needs.changes.outputs.deny == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand Down Expand Up @@ -107,6 +139,8 @@ jobs:
command: check bans licenses sources

run-tests-all-features:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
Expand Down Expand Up @@ -164,6 +198,8 @@ jobs:
run: cargo test --doc --workspace

run-tests-no-default-features:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
Expand Down Expand Up @@ -213,6 +249,8 @@ jobs:
run: cargo nextest run --workspace --profile ci --no-default-features --features "test-utils"

run-docs:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
Expand Down
Loading

0 comments on commit 4463050

Please sign in to comment.