hedgedoc/.github/workflows/build-and-test.yml
renovate[bot] c60c793df1 chore(deps): update actions/checkout action to v3.5.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-03-24 12:10:52 +01:00

43 lines
1,022 B
YAML

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:
node: ['14', '16']
name: Node ${{ matrix.node }}
steps:
- name: Checkout repository
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- 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
uses: actions/upload-artifact@v3
if: github.ref == 'refs/heads/master' && matrix.node-version == '16'
with:
name: Prebuild with Node.js ${{ matrix.node-version }}
path: |
**
!.git
!node_modules