2023-02-19 16:42:32 -05:00
|
|
|
name: Build & run tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-09-10 13:22:23 -04:00
|
|
|
node: ['18', '20']
|
2023-02-19 16:42:32 -05:00
|
|
|
name: Node ${{ matrix.node }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-08-28 16:16:51 -04:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2023-02-19 16:42:32 -05:00
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: ./.github/actions/setup-node
|
|
|
|
with:
|
|
|
|
NODEJS_VERSION: ${{ matrix.node }}
|
|
|
|
|
|
|
|
- name: Build project
|
|
|
|
run: yarn run build
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: yarn run mocha-suite
|
|
|
|
|
|
|
|
- name: Upload build artifacts
|
2024-01-18 15:18:46 -05:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-02-19 16:42:32 -05:00
|
|
|
if: github.ref == 'refs/heads/master' && matrix.node-version == '16'
|
|
|
|
with:
|
|
|
|
name: Prebuild with Node.js ${{ matrix.node-version }}
|
|
|
|
path: |
|
|
|
|
**
|
|
|
|
!.git
|
|
|
|
!node_modules
|