More content #137
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: | |
# Can run on command | |
workflow_dispatch: | |
# Can be run by other actions | |
workflow_call: | |
# Runs on pull requests | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
name: build-and-test | |
# Running on ubuntu-latest, nothing special | |
runs-on: ubuntu-latest | |
steps: | |
# As usual, we simply checkout the project | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install the latest version of node | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
# Install yarn (prefered build tool) | |
- name: Install Yarn | |
run: npm install -g yarn | |
# Install project dependencies | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
# Make sure the application can build | |
- name: Build application | |
run: yarn run build | |
# Now we run our tests | |
- name: Run tests | |
run: yarn run test | |
# Now we run our lints | |
- name: Run lints | |
run: yarn run lint | |
# Now we run our pretty checks for code formatting | |
- name: Run pretty checks | |
run: yarn run pretty-check | |
# Finally we run svelte-check for some last minute svelte sanity | |
- name: Run svelte-check | |
run: yarn run svelte-check | |
test: | |
# Runs on execution of build | |
needs: build | |
name: playwright-test | |
# Running on ubuntu-latest, nothing special | |
runs-on: ubuntu-latest | |
steps: | |
# As usual, we simply checkout the project | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install the latest version of node | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
# Install yarn (prefered build tool) | |
- name: Install Yarn | |
run: npm install -g yarn | |
# Install project dependencies | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
# Install Playwright browsers | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
# Run Playwright tests | |
- name: Run tests | |
run: yarn run test:playwright | |
analyze: | |
# Runs on successful playwright | |
needs: [build, test] | |
name: lighthouse-test | |
# Running on ubuntu-latest, nothing special | |
runs-on: ubuntu-latest | |
steps: | |
# As usual, we simply checkout the project | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install the latest version of node | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
# Install yarn (prefered build tool) | |
- name: Install Yarn | |
run: npm install -g yarn | |
# Install project dependencies | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
# Install Playwright browsers | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
# Run Lighthouse Playwright tests | |
- name: Run Playwright tests | |
run: yarn run test:lighthouse |