Skip to content

Commit

Permalink
Add a workflow to test the sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Oct 6, 2023
1 parent 6f7fa51 commit ecc44dc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build and Test

on:
push:
branches:
- '**'
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name == 'workflow_dispatch' }}
strategy:
fail-fast: false
matrix:
node:
- 'current'
- 'lts/*'
- 'lts/-1'
name: Build and test (Node ${{ matrix.node }})
steps:
- name: Prepare the source
uses: myrotvorets/composite-actions/build-test-nodejs@master
with:
node-version: ${{ matrix.node }}
run-tests: no

- name: Install dependencies (example)
run: npm ci
working-directory: example

- name: Build
run: npm run build
working-directory: example

- name: Smoke test
run: npx ts-node src/index.ts
working-directory: example

0 comments on commit ecc44dc

Please sign in to comment.