Rework integration test

This commit is contained in:
Luc Perkins 2024-05-18 16:41:44 -03:00
parent 867cfad681
commit 6eaa23c963
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
3 changed files with 35 additions and 36 deletions

View file

@ -39,7 +39,8 @@ jobs:
- name: Build package and create closure
run: |
nix build .# -L --fallback && nix-store --export $(nix-store -qR ./result) | xz -9 > "${{ env.CLOSURE_FILE }}"
nix build .# -L --fallback && \
nix-store --export $(nix-store -qR ./result) | xz -9 > "${{ env.CLOSURE_FILE }}"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2

View file

@ -1,14 +1,42 @@
name: Integration tests
name: Run checks and integration test
on:
workflow_run:
workflows: ["Build artifacts"]
types:
- completed
pull_request:
push:
branches: [main]
jobs:
checks:
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check health of flake.lock
uses: DeterminateSystems/flake-checker-action@main
with:
fail-mode: true
- name: Check Rust formatting
run: nix develop --command cargo fmt --check
- name: Clippy
run: nix develop --command cargo clippy
build:
needs: checks
uses: ./.github/workflows/build.yaml
secrets: inherit
test-magic-nix-cache-action:
runs-on: ${{ matrix.systems.runner }}
needs: build
env:
CLOSURE_FILE: magic-nix-cache-${{ matrix.systems.system }}
strategy:

View file

@ -1,30 +0,0 @@
name: Rust checks
on:
pull_request:
push:
branches: [main]
jobs:
checks:
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check health of flake.lock
uses: DeterminateSystems/flake-checker-action@main
with:
fail-mode: true
- name: Check Rust formatting
run: nix develop --command cargo fmt --check
- name: Clippy
run: nix develop --command cargo clippy