2.14.1 #9
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
# https://help.github.com/en/actions | |
# https://github.com/actions | |
# https://github.com/actions/checkout | |
# https://github.com/actions/setup-node | |
# TODO: add windows-latest after fixing CMake. | |
# https://github.com/micro-os-plus/build-helper-xpack/actions/workflows/ci.yml | |
name: CI on Push | |
on: | |
push: | |
paths-ignore: | |
- '.vscode/**' | |
- 'LICENSE' | |
- '**.md' | |
- '.clang-format' | |
- '.gitignore' | |
- '.npmignore' | |
# This should disable running the workflow on tags, according to the | |
# on.<push|pull_request>.<branches|tags> GitHub Actions docs. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore | |
branches: | |
- '*' | |
pull_request: | |
jobs: | |
ci-test: | |
name: 'CI build-helper tests' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
os: [ubuntu-22.04, macos-12] | |
# https://nodejs.org/en - use LTS | |
node-version: [18] | |
# https://www.npmjs.com/package/xpm | |
xpm-version: ['0.16.2'] | |
steps: | |
- name: Checkout | |
# https://github.com/actions/checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 3 | |
- name: Setup Node.js ${{ matrix.node-version }} on ${{ matrix.os }} | |
# https://github.com/actions/setup-node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install xpm@${{ matrix.xpm-version }} on Unix | |
if: runner.os != 'Windows' | |
run: sudo npm install -g xpm@${{ matrix.xpm-version }} | |
- name: Install xpm@${{ matrix.xpm-version }} on Windows | |
if: runner.os == 'Windows' | |
run: npm install -g xpm@${{ matrix.xpm-version }} | |
- name: Show node & npm versions, environment | |
run: | | |
node --version | |
npm --version | |
xpm --version | |
env | sort | |
- name: Run test | |
run: | | |
xpm install | |
xpm run test | |