Skip to content

Feat/popular lists #1482

Feat/popular lists

Feat/popular lists #1482

Workflow file for this run

name: The Trial of Truth aka CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
permissions:
contents: read
jobs:
files-changed:
if: github.event.pull_request.draft == false
name: The Scrutiny of Change
runs-on: ubuntu-latest
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
outputs:
api_source: ${{ steps.changes.outputs.api_source }}
client_source: ${{ steps.changes.outputs.client_source }}
workflows: ${{ steps.changes.outputs.workflows }}
steps:
- name: Unveiling the Repository
uses: actions/checkout@v4
- name: The Chronicle of Alterations
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
api_source:
- 'projects/api/src/**'
- 'projects/api/deno.json'
client_source:
- 'projects/client/src/**'
- 'projects/client/i18n/**'
- 'projects/client/static/**'
- 'projects/client/package.json'
- 'projects/client/deno.json'
- 'projects/client/svelte.config.js'
- 'projects/client/vite.config.ts'
- 'projects/client/wrangler.toml'
workflows:
- '.github/workflows/**'
test:
needs: files-changed
if: ${{
needs.files-changed.outputs.api_source == 'true' ||
needs.files-changed.outputs.client_source == 'true' ||
needs.files-changed.outputs.workflows == 'true'
}}
name: The Interrogation Room (Test)
runs-on: ubuntu-latest
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Secure the Evidence aka Checkout Code
uses: actions/checkout@v4
- name: Summon the Digital Oracle aka Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Gather the Tools aka Install Dependencies
run: 'deno task install'
- name: Probe the Client's Mind aka Run Tests
working-directory: projects/client
run: 'deno task test:cov'
- name: Consulting the Oracles of Type aka Type Check
working-directory: projects/client
run: 'deno task check'
- name: Probing the API's Mind aka Run Tests
working-directory: projects/api
run: 'deno task test'
- name: The Phantom Browsers Materialize aka Install Browsers
working-directory: projects/client
run: 'deno run -A npm:@playwright/test install chromium'
- name: Whispers of the Future aka Preview Build
working-directory: projects/client
run: 'deno task build:preview'
env:
TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }}
- name: Witnessing the Premonition ake Run Preview
working-directory: projects/client
run: |
deno task preview &
echo $! > server.pid
env:
TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }}
TRAKT_CLIENT_SECRET: ${{ secrets.TRAKT_CLIENT_SECRET }}
TRAKT_SESSION_SECRET: ${{ secrets.TRAKT_SESSION_SECRET }}
- name: The Verdict on the Interface aka E2E Tests
working-directory: projects/client
run: 'deno task test:e2e'
env:
E2E_HEADLESS: 'true'
E2E_BASE_URL: 'http://localhost:4173/'
- name: Witnessing the Premonition's Demise aka Kill Preview
working-directory: projects/client
run: kill $(cat server.pid)
- name: Trial by Code Climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
prefix: ${{github.workspace}}
coverageLocations: |
${{github.workspace}}/projects/client/coverage/clover.xml:clover
- name: Trial by Deep Source
uses: deepsourcelabs/test-coverage-action@master
with:
key: javascript
coverage-file: ${{github.workspace}}/projects/client/coverage/lcov.info
dsn: ${{ secrets.DEEPSOURCE_DSN }}
build:
name: The Forge (Build)
runs-on: ubuntu-latest
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
needs: test
steps:
- name: Secure the Evidence aka Checkout Code
uses: actions/checkout@v4
- name: Summon the Digital Oracle aka Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Gather the Tools aka Install Dependencies
run: 'deno task install'
- name: Weaving the Digital Tapestry aka Build
working-directory: projects/client
run: 'deno task build'
env:
TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }}
TRAKT_POST_HOG_TOKEN: ${{ secrets.TRAKT_POST_HOG_TOKEN }}
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID }}
FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}
- name: Delivering the Goods aka Upload Build
if: github.ref == 'refs/heads/main'
uses: ./.github/actions/upload-output
with:
buildArtifact: pandoras-archive
cloudflareArtifact: the-edge-awakened
wranglerArtifact: the-edge-config