Skip to content

Commit

Permalink
Merge pull request #72 from dxw/fix/use-correct-node-version-in-githu…
Browse files Browse the repository at this point in the history
…b-actions

Fix 'Lint & Test' and 'Playwright Tests' GitHub Actions workflows
  • Loading branch information
danlivings-dxw authored Oct 14, 2024
2 parents 6d6e1b9 + df52c79 commit 8977ba0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Read .nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Install dependencies
run: script/setup
run: script/setup --ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read .nvmrc
run: echo "{NODE_VERSION}={$(cat .nvmrc)}" >> $GITHUB_OUTPUT
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
./script/setup
./script/setup --ci
- name: Run lint & test
run: |
./script/test
7 changes: 5 additions & 2 deletions script/setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ fi

rm -rf node_modules

script/bootstrap

if [ "$1" = "--ci" ]; then
npm install
else
script/bootstrap
fi

0 comments on commit 8977ba0

Please sign in to comment.