From 032bcda9e3aca51e174d282598bc39aa08b97f5d Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Wed, 22 Jan 2025 10:46:09 +1100 Subject: [PATCH] Update the GitHub Actions CI config. --- .github/workflows/ci.yml | 52 +++++++++++++++++++++++++++------------- changelog.md | 8 +++++++ 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 792f9d4..9ac049a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,24 +1,44 @@ name: CI -on: [push, pull_request] +on: [push, workflow_dispatch] +env: + DENO_VERSION: "^2.1.6" jobs: + format-check: + name: Format check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: ${{ env.DENO_VERSION }} + - run: deno fmt --check + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: ${{ env.DENO_VERSION }} + - run: deno lint + type-check: + name: Type check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 + with: + deno-version: ${{ env.DENO_VERSION }} + - run: ./scripts/type-check.sh test: - name: Test with ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Test strategy: matrix: os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Setup Deno - uses: denoland/setup-deno@v1 + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v2 with: - deno-version: "^2.1.6" - - name: Format check - run: deno fmt --check - - name: Lint - run: deno lint - - name: Type check - run: ./scripts/type-check.sh - - name: Test - run: ./scripts/test.sh + deno-version: ${{ env.DENO_VERSION }} + - run: ./scripts/test.sh diff --git a/changelog.md b/changelog.md index 74064c1..9bba17f 100644 --- a/changelog.md +++ b/changelog.md @@ -22,6 +22,14 @@ ### Patch +- Updated the GitHub Actions CI config: + - No longer run the workflow on pull request. + - Enable manual workflow dispatching. + - Run checks in seperate jobs. + - Removed custom step names. + - Use Deno v2. + - Updated actions/checkout to v4. + - Updated actions/setup-deno to v2. - Updated the project and readme import maps for the latest React v18.3.1 URLs. - Configured Deno to not auto-generate a lockfile. - Fixed formatting issues caused by updating Deno.