Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
camillobruni committed Jan 29, 2025
1 parent 68d8f57 commit 66192b3
Showing 1 changed file with 38 additions and 12 deletions.
50 changes: 38 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,27 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache node modules
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-build-node-modules-

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.13.0
- name: Install
run: npm install
node-version: '23.x'

- name: Install Node Packages
run: npm ci

- name: Run linters
run: npm run format

- name: Check if anything changed
run: |
git_status="`LC_ALL=C git status --porcelain --ignore-submodules -unormal 2>&1`"
Expand All @@ -35,6 +47,7 @@ jobs:
git diff -U8
exit 1
fi
build:
name: Build
runs-on: macos-latest
Expand All @@ -45,19 +58,32 @@ jobs:
- name: Install Firefox
if: ${{ matrix.browser == 'firefox' }}
run: brew install --cask firefox

- name: Checkout Branch
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache node modules
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-build-node-modules-

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.13.0
- name: Install
run: npm install
- name: Run tests
node-version: '23.x'

- name: Install Node Packages
run: npm ci

- name: Run Unit Tests
run: |
echo "Running in $BROWSER"
npm run test:${{ matrix.browser }}
- name: Run end2end
- name: Run end2end Tests
run: |
echo "Running in $BROWSER"
npm run test-e2e:${{ matrix.browser }}

0 comments on commit 66192b3

Please sign in to comment.