Update settings code, add explainer to policy. (#6) #40
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
# Install, test and Deploy LD Explorer | |
name: Test and Deploy | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
# ********************** | |
# Build | |
# ********************** | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
node-version: 20.15.1 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Audit | |
run: npm audit --audit-level=critical | |
- name: Svelte-Check | |
run: npm run check | |
- name: Copyright check | |
run: npm run copyright:check | |
- name: Linting and Code Quality | |
run: npm run lint | |
- name: Build | |
env: | |
BASE_PATH: '/${{ github.event.repository.name }}' | |
run: npm run build | |
- name: Upload build artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build | |
# ********************** | |
# Unit + component tests | |
# ********************** | |
unit_and_component_tests: | |
name: 'Unit and component tests' | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
node-version: 20.15.1 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Component and Unit tests | |
run: npm run test:unit+component | |
# ********************** | |
# End to end tests | |
# ********************** | |
e2e_tests: | |
runs-on: ubuntu-latest | |
needs: build | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
node-version: 20.15.1 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npm run test:e2e -- --reporter=html | |
# ********************** | |
# Deploy | |
# ********************** | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build, e2e_tests, unit_and_component_tests] | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy | |
id: deployment | |
uses: actions/deploy-pages@v4 |