Skip to content

ci: run tests on actions #6

ci: run tests on actions

ci: run tests on actions #6

Workflow file for this run

# basic nodejs github action to run npm test and build
name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm install --save-dev https://github.com/basiljs/basil.js#develop
- run: npm test
- run: npm run build --if-present
- run: npm run lint --if-present
release:
name: semantic-release
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- run: npm ci
- id: semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}