Skip to content

Commit

Permalink
Updates the pipeline to run on 18 and 20
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanformio committed May 3, 2024
1 parent 6c8c037 commit 06dc7c1
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ env:
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- run: echo "Triggered by ${{ github.event_name }} event."

- name: Check out repository code ${{ github.repository }} on ${{ github.ref }}
uses: actions/checkout@v3

- name: Set up Node.js ${{ env.NODE_VERSION }}
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Cache node modules
Expand All @@ -41,10 +44,19 @@ jobs:
build:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Check out repository code ${{ github.repository }} on ${{ github.ref }}
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Restore node modules from cache
uses: actions/cache@v3
with:
Expand All @@ -61,6 +73,9 @@ jobs:
test-current:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Check out repository code ${{ github.repository }} on ${{ github.ref }}
uses: actions/checkout@v3
Expand All @@ -73,6 +88,12 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Test
uses: borales/actions-yarn@v4
with:
Expand All @@ -81,11 +102,20 @@ jobs:
test-target:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Check out repository code ${{ github.repository }} on ${{ github.ref }}
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Merge target branch into current branch
run: |
Expand Down

0 comments on commit 06dc7c1

Please sign in to comment.