Skip to content

Commit

Permalink
Runs build and test with 18 and 20
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanformio committed May 3, 2024
1 parent eeaff43 commit 9c8ee6a
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,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 Down Expand Up @@ -47,10 +50,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 @@ -70,10 +82,19 @@ 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

- 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 @@ -90,6 +111,9 @@ 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
Expand All @@ -110,10 +134,10 @@ jobs:
echo "Merge successful."
fi
- 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: Restore node modules from cache
Expand Down

0 comments on commit 9c8ee6a

Please sign in to comment.