Skip to content

Commit

Permalink
ci: update node versions matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Oct 18, 2024
1 parent 05266fb commit 43f0976
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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 oidc-provider (OIDC)
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 @@ -51,7 +51,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
38 changes: 13 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@ jobs:
if: ${{ github.repository == 'panva/node-oidc-provider' || github.event_name == 'workflow_dispatch' }}
uses: panva/.github/.github/workflows/npm-audit.yml@main

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"
test:
if: ${{ github.repository == 'panva/node-oidc-provider' || github.event_name == 'workflow_dispatch' }}
needs:
- node-versions
name: Test Suite
runs-on: ubuntu-latest
continue-on-error: ${{ !startsWith(matrix.node-version, 'lts') }}
strategy:
fail-fast: false
matrix:
node-version:
- lts/hydrogen # 18
- lts/iron # 20
- current
node-version: ${{ fromJSON(needs.node-versions.outputs.matrix) }}

steps:
- name: Checkout
Expand All @@ -39,23 +47,3 @@ jobs:
check-latest: true
- run: npm clean-install
- run: npm run ci

# deploy:
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'panva/node-oidc-provider' }}
# runs-on: ubuntu-latest
# needs:
# - test
# strategy:
# fail-fast: false
# matrix:
# app:
# - radiant-refuge-93411
# - powerful-cove-31049
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: '2.7'
# - run: gem install dpl-heroku -v 1.10.14
# - run: dpl --provider=heroku --strategy=api --api-key=${{ secrets.HEROKU_AUTH_TOKEN }} --app=${{ matrix.app }}

0 comments on commit 43f0976

Please sign in to comment.