Migrate to sveltekit 2 and update deps #509
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: [19.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: 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: [19.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: Install Playwright | |
run: npx playwright install | |
- name: Wait for the Netlify Preview | |
uses: kamranayub/[email protected] | |
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: [19.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: Lint Code | |
run: npm run lint |