Add helper functions for sending InSim messages #79
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build-and-test: | |
name: 'Build & Test' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Install | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: install | |
- name: Check Code Format | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: format:check | |
- name: Lint | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: lint | |
- name: Run Unit Tests | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: test --ci --reporters=default --reporters=jest-junit --coverage | |
- name: Build | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: build | |
- name: Test Example Apps | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: test:examples | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test Results (Node.js ${{ matrix.node-version }}) | |
path: junit.xml | |
- name: Update Coverage Badge | |
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
uses: we-cli/coverage-badge-action@main | |
publish-test-results: | |
name: 'Publish Test Results' | |
needs: build-and-test | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
if: always() | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
junit_files: 'artifacts/**/*.xml' | |
release: | |
permissions: | |
contents: write # to create release tags (cycjimmy/semantic-release-action) | |
issues: write # to post release that resolves an issue (cycjimmy/semantic-release-action) | |
name: 'Release' | |
needs: build-and-test | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- name: Install | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: install | |
- name: Build | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: build | |
- name: Release | |
uses: cycjimmy/semantic-release-action@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |