Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use nix in github action #30

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 9 additions & 21 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,23 @@ env:
jobs:
build:

runs-on: ubuntu-latest
runs-on: macos-12

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 }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Build
working-directory: app/
run: |
cargo build
cargo install trunk
run: nix-shell --run "node --version && 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
- name: Install playwright deps
run: nix-shell --run "npm install"
- name: Install playwright deps and run tests
working-directory: app/
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 "node --version && npx playwright install --with-deps && 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
Loading