Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
chore: fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jul 27, 2023
1 parent 9458dba commit 872670f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Yarn Cache and Install
description: Installs dependencies and caches them

inputs:
working-directory:
default: ./
required: false

runs:
using: composite
steps:
Expand All @@ -11,6 +16,7 @@ runs:
path: "**/node_modules"
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
working-directory: ${{ inputs.working-directory }}
run: yarn --immutable
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
nix build .#
- name: Dereference symlink
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
run: echo "UPLOAD_PATH=$(readlink -f acvm_js/result)" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand All @@ -51,12 +51,15 @@ jobs:
uses: actions/download-artifact@v3
with:
name: acvm-js
path: ./result
path: ./acvm_js/result

- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./acvm_js

- name: Run node tests
working-directory: ./acvm_js
run: yarn test

test-browser:
Expand All @@ -72,15 +75,19 @@ jobs:
uses: actions/download-artifact@v3
with:
name: acvm-js
path: ./result
path: ./acvm_js/result

- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./acvm_js

- name: Install playwright deps
working-directory: ./acvm_js
run: |
npx playwright install
npx playwright install-deps
- name: Run browser tests
working-directory: ./acvm_js
run: yarn test:browser
3 changes: 3 additions & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/setup
with:
working-directory: ./acvm_js

- name: Run eslint
working-directory: ./acvm_js
run: yarn lint

0 comments on commit 872670f

Please sign in to comment.