Merge pull request #296 from NIAEFEUP/289-auth-login-page-functionality #573
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: Build storybook | |
run: npm run build-storybook | |
- name: Test | |
run: npm run test-storybook: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 |