Skip to content

CI: Test Node.js versions supported by this repo #36

CI: Test Node.js versions supported by this repo

CI: Test Node.js versions supported by this repo #36

Workflow file for this run

name: Continuous Integration
on: push
jobs:
unit-tests:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-22.04
node-version: [ 18.x, 20.x, 22.x ]
go-version:
- 1.16.x
steps:
- uses: actions/checkout@v4
- name: 'Install Golang ${{ matrix.go-version }}'
uses: actions/setup-go@v2
with:
go-version: '${{ matrix.go-version }}'
- name: Run Go unit tests
run: go test ./...
- name: 'Install node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node-version }}'
- name: Install npm dependencies
run: npm install
- name: Run JS unit tests
run: npm test
- name: Run JS end-to-end tests
run: npm run end-to-end
npm-publish:
needs: unit-tests
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: 'Install Golang 1.16.x'
uses: actions/setup-go@v2
with:
go-version: '1.16.x'
- name: 'Install node.js 16.x'
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Install npm dependencies
run: npm install
- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: >
if [[ -n "$GH_TOKEN" && -n "$NPM_TOKEN" ]]; then
curl "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" | bash -
fi