use nix in github action #57
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
working-directory: app/ | |
run: nix-shell --run "cargo build" | |
- name: Run tests | |
working-directory: app/ | |
run: nix-shell --run "cargo test" | |
- name: Npm install | |
working-directory: app/ | |
run: nix-shell --run "npm install" | |
- name: Install playwright deps and run tests | |
working-directory: app/ | |
run: nix-shell --run "npx playwright install --with-deps && npx playwright test" |