Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions .github/workflows/backfill-releases.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/ci-meta.yml

This file was deleted.

115 changes: 48 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,112 +1,93 @@
name: CI

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "src/**"
- "__tests__/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/**"
push:
branches: [main, develop]
paths:
- "src/**"
- "__tests__/**"
- "package.json"
- "package-lock.json"

permissions:
contents: read

run-name: "CI — ${{ github.ref_name }} @ ${{ github.sha }}"
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
contents: read
actions: read

env:
NODE_VERSION: 20
NODE_VERSION: "20"
FORCE_COLOR: 1
CI: true

jobs:
test:
if: github.event_name == 'push' || github.event.pull_request.draft == false
timeout-minutes: 15
name: Test & Lint
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Harden runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
fetch-depth: 1

- name: 🟢 Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
registry-url: https://registry.npmjs.org/
cache-dependency-path: package-lock.json

- name: Clear npm cache
run: npm cache clean --force
shell: bash

- name: Install dependencies
run: |
npm ci --no-optional --no-audit --prefer-offline
run: npm ci --prefer-offline
shell: bash

- name: 🧹 Lint
run: npm run lint --if-present

- name: 🔍 Type check
run: npm run typecheck --if-present

- name: ✅ Test
run: npm test -- --ci --reporters=default --reporters=jest-junit --passWithNoTests
- name: Lint
run: npm run lint
shell: bash

- name: Upload JUnit
if: always()
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: junit
path: junit.xml
- name: Test
run: npm test -- --ci --passWithNoTests --coverage
shell: bash

- name: Upload coverage
if: always()
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
name: coverage
path: coverage
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
continue-on-error: true

coverage:
needs: test
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
timeout-minutes: 5
build:
name: Build Check
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10
needs: test
steps:
- name: Harden runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Download coverage
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: coverage
path: coverage
continue-on-error: true
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Upload to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
node-version: ${{ env.NODE_VERSION }}
cache: npm

- name: Install dependencies
run: npm ci --prefer-offline

- name: Build
run: npm run build --if-present
Loading
Loading