This commit is contained in:
Arnaud 2024-10-11 15:58:36 +02:00
parent a9390ca6a4
commit a706507803
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -22,16 +22,16 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: sudo apt update && sudo apt install libgomp1 run: sudo apt update && sudo apt install libgomp1
- name: Cache circuits - name: Restore cached circuits
id: cache-circuits id: restore-circuits
uses: actions/cache uses: actions/cache/restore@v4
with: with:
path: | path: |
datadir/circuits datadir/circuits
key: ${{ env.circuit_version }}-circuits key: ${{ env.circuit_version }}-circuits
- name: Download circuits - name: Download circuits
if: steps.cache-circuits.outputs.cache-hit != 'true' if: steps.restore-circuits.outputs.cache-hit != 'true'
run: | run: |
platform=${RUNNER_OS,,} platform=${RUNNER_OS,,}
architecture=$([[ $RUNNER_ARCH == 'X64' ]] && echo amd64 || echo ${RUNNER_ARCH,,}) architecture=$([[ $RUNNER_ARCH == 'X64' ]] && echo amd64 || echo ${RUNNER_ARCH,,})
@ -45,6 +45,13 @@ jobs:
chmod +x cirdl-${circuit_version}-${platform}-${architecture} chmod +x cirdl-${circuit_version}-${platform}-${architecture}
./cirdl-${circuit_version}-${platform}-${architecture} ./datadir/circuits ${eth_provider} ${marketplace_address} ./cirdl-${circuit_version}-${platform}-${architecture} ./datadir/circuits ${eth_provider} ${marketplace_address}
- name: Cache circuits
id: cache-circuits
uses: actions/cache/save@v4
with:
path: datadir/circuits
key: ${{ env.circuit_version }}-circuits
- name: Restore cached codex - name: Restore cached codex
id: restore-codex id: restore-codex
uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
@ -96,33 +103,28 @@ jobs:
with: with:
node-version: lts/* node-version: lts/*
- name: Cache node modules - uses: actions/cache@v4
id: cache-npm id: npm-cache
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with: with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} - if: steps.npm-cache.outputs.cache-hit != 'true'
name: List the state of node modules name: Install dependencies
continue-on-error: true
run: npm list
- name: Install dependencies
run: npm ci run: npm ci
- name: Install Playwright Browsers - uses: actions/cache@v4
id: playwright-browsers
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-node-${{ hashFiles('**/playwright.config') }}
- if: steps.playwright-browsers.outputs.cache-hit != 'true'
name: Install Playwright Browsers
run: npx playwright install --with-deps run: npx playwright install --with-deps
- name: Run Playwright tests - name: Run Playwright tests
run: npx playwright test run: npm run test
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }} # if: ${{ !cancelled() }}