Skip to content

Commit

Permalink
use nix in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Tranquilla committed Dec 6, 2023
1 parent 35d7fa0 commit 63d7bff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,21 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: cachix/install-nix-action@v22
with:
node-version: 18
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
working-directory: app/
run: |
cargo build
cargo install trunk
run: nix-shell --run "cargo build"
- name: Run tests
working-directory: app/
run: cargo test --verbose
run: nix-shell --run "cargo test"
- name: Npm install
working-directory: app/
run: npm install
run: nix-shell --run "npm install"
- name: Install playwright deps
working-directory: app/
run: npx playwright install --with-deps
run: nix-shell --run "npx playwright install --with-deps"
- name: Run playwright tests
working-directory: app/
run: |
rustup target add wasm32-unknown-unknown
npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
run: nix-shell --run "npx playwright test"
1 change: 1 addition & 0 deletions app/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
cacert
cargo-make
trunk
nodejs_18
(rust-bin.selectLatestNightlyWith( toolchain: toolchain.default.override {
extensions= [ "rust-src" "rust-analyzer" ];
targets = [ "wasm32-unknown-unknown" ];
Expand Down

0 comments on commit 63d7bff

Please sign in to comment.