Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Build/node version ci updates (#24)
Browse files Browse the repository at this point in the history
* chore: yvm no longer used

* build: nvm points to lts/hydrogen

* ci: use node version matrix, split test and lint
  • Loading branch information
mcataford authored Mar 28, 2023
1 parent 73b0b10 commit b620025
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
50 changes: 39 additions & 11 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
runs-on: ubuntu-20.04
if: "github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v3.3.0
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Create artifacts directory
Expand All @@ -41,19 +41,19 @@ jobs:
with:
name: commit-watch-artifacts
path: ${{ env.ARTIFACT_DIR }}
tests:
name: Lint & Tests
linting:
name: Lint
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v3.3.0
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
node-version: 18
- name: Create artifacts directory
run: mkdir -p ${{ env.ARTIFACT_DIR }}
- name: Restore yarn cache
Expand All @@ -63,11 +63,39 @@ jobs:
path: |
./.yarn
./.pnp.*
key: ${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }}
key: ${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable
- name: Linting
run: yarn lint:ci
tests:
name: Tests
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [14, 16, 18]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Create artifacts directory
run: mkdir -p ${{ env.ARTIFACT_DIR }}
- name: Restore yarn cache
id: yarn-cache
uses: actions/cache@v2
with:
path: |
./.yarn
./.pnp.*
key: ${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable
- name: Set GitHub user for tests
run: |
git config --global user.email "[email protected]"
Expand All @@ -86,13 +114,13 @@ jobs:
build:
name: Build
runs-on: ubuntu-20.04
needs: [tests]
needs: [linting,tests]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v3.3.0
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Create artifacts directory
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/gallium
lts/hydrogen
2 changes: 0 additions & 2 deletions .yvmrc

This file was deleted.

0 comments on commit b620025

Please sign in to comment.