Skip to content

Commit

Permalink
ci: update node versions and remove ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Oct 18, 2024
1 parent 110575b commit 49d8f8b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 28 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:

jobs:
build:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
uses: panva/.github/.github/workflows/build-conformance-suite.yml@main

run:
Expand Down Expand Up @@ -88,7 +87,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- name: npm run conformance
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
registry-url: https://registry.npmjs.org
always-auth: true
- run: npm publish --provenance
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: node .release-notes.cjs
env:
Expand Down
46 changes: 22 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,33 @@ on:

jobs:
build:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- run: npm run build

format:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- run: npm run format-check
- run: git diff --quiet

check-docs:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
needs:
- build
Expand All @@ -51,7 +48,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- uses: r-lib/actions/setup-pandoc@v2
Expand All @@ -60,18 +57,25 @@ jobs:
- run: npm run build
- run: npm run docs-check

node-versions:
name: Get Node.js Versions
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.query.outputs.matrix }}
steps:
- id: query
run: |
echo "matrix=$(curl -s https://raw.githubusercontent.com/actions/node-versions/refs/heads/main/versions-manifest.json | jq -c '[.[] | select(.lts) | select(.version | split(".")[0] | tonumber >= 18) | .lts | ascii_downcase | "lts/\(.)"] + ["current"] | unique')" >> "$GITHUB_OUTPUT"
node:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
needs:
- node-versions
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- lts/hydrogen # 18
- lts/iron # 20
- current
node-version: ${{ fromJSON(needs.node-versions.outputs.matrix) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -94,7 +98,6 @@ jobs:
if-no-files-found: warn

edge-runtime:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -104,7 +107,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- name: Run Test Suite
Expand All @@ -119,7 +122,6 @@ jobs:
if-no-files-found: warn

electron:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
needs:
- build
runs-on: macos-latest
Expand All @@ -129,7 +131,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- run: npm install --global electron
Expand All @@ -145,7 +147,6 @@ jobs:
if-no-files-found: warn

deno:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -158,7 +159,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- name: Run Test Suite
Expand All @@ -173,7 +174,6 @@ jobs:
if-no-files-found: warn

workerd:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -183,15 +183,14 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- run: npm install --global workerd
- name: Run Test Suite
run: npm run tap:workerd

bun:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -204,7 +203,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- name: Run Test Suite
Expand All @@ -219,7 +218,6 @@ jobs:
if-no-files-found: warn

browsers:
if: ${{ github.repository == 'panva/openid-client' || github.event_name == 'workflow_dispatch' }}
needs:
- build
runs-on: ${{ matrix.runs-on || 'ubuntu-latest' }}
Expand All @@ -244,7 +242,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/iron # 20
node-version: lts/*
cache: 'npm'
- run: npm clean-install
- run: npm install --global testcafe@3
Expand Down

0 comments on commit 49d8f8b

Please sign in to comment.