Migrate to sveltekit 2 and update deps #514
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
test-vite: | |
runs-on: ubuntu-latest | |
name: Test Vite | |
strategy: | |
matrix: | |
node-version: [21.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build site | |
run: npm run build | |
- name: Test | |
run: CI=true npm run test-vite:coverage | |
- name: Upload code coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
test-storybook: | |
runs-on: ubuntu-latest | |
name: Test Storybook | |
strategy: | |
matrix: | |
node-version: [21.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build site | |
run: npm run build | |
- name: Install Playwright | |
run: npx playwright install | |
- name: Wait for the Netlify Preview | |
uses: kamranayub/wait-for-netlify-action@v2.1.0 | |
id: waitForNetlify | |
with: | |
site_name: 'niaefeup-frontend-storybook' | |
max_timeout: 300 # 5 minutes | |
env: | |
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | |
- name: Test | |
run: npm run test-storybook:coverage -- --url ${{ steps.waitForNetlify.outputs.url }} --ci | |
- name: Upload code coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
strategy: | |
matrix: | |
node-version: [21.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build site | |
run: npm run build | |
- name: Lint Code | |
run: npm run lint |