Skip to content

Commit

Permalink
ci: add PR validation/build job, use node 20.x (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen authored Apr 21, 2024
1 parent 7f5013b commit 271523c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build pull request

env:
EM_VERSION: 3.1.56
EM_CACHE_FOLDER: 'emsdk-cache'

on:
pull_request:
branches:
- main

jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup cache
id: cache-system-libraries
uses: actions/cache@v2
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}

- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}

- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: |
yarn install --frozen-lockfile
- name: Build package
run: |
npm run build
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup cache
id: cache-system-libraries
Expand All @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down

0 comments on commit 271523c

Please sign in to comment.