fix: keep actions disabled until handled #1546
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: 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/**' | |
openapi: | |
- 'projects/openapi/*' | |
openapi: | |
needs: files-changed | |
name: The Mystic Documentation Dance (OpenAPI) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Summoning the Ancient Scrolls aka Checkout Code | |
uses: actions/checkout@v4 | |
- name: Channeling the Digital Spirits aka Install Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Gathering the Sacred Artifacts aka Install Dependencies | |
run: 'deno task install' | |
- name: The Prophecy's Validation aka Validate OpenAPI | |
if: ${{ | |
needs.files-changed.outputs.api_source == 'true' || | |
needs.files-changed.outputs.openapi == 'true' | |
}} | |
run: deno task openapi:validate | |
- name: Transcribing the Ancient Knowledge aka Generate OpenAPI | |
if: github.ref == 'refs/heads/main' | |
run: deno task generate | |
working-directory: projects/openapi | |
- name: Preserving the Sacred Texts aka Upload Definition | |
if: github.ref == 'refs/heads/main' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: openapi | |
path: projects/openapi/openapi.json | |
if-no-files-found: error | |
retention-days: 30 | |
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 }} | |
TRAKT_SESSION_SECRET: ${{ secrets.TRAKT_SESSION_SECRET }} | |
- 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 }} | |
TRAKT_SESSION_SECRET: ${{ secrets.TRAKT_SESSION_SECRET }} | |
- 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 |