Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add a GitHub workflow to test a module with CITGM (#849)
- Loading branch information
1 parent
59e5a60
commit ae179b5
Showing
2 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Test a module with CITGM | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
module: | ||
description: 'Module to test' | ||
required: true | ||
repository: | ||
description: 'CITGM repository to checkout' | ||
required: true | ||
default: nodejs/citgm | ||
ref: | ||
description: 'CITGM GitHub ref to checkout' | ||
required: true | ||
default: main | ||
|
||
jobs: | ||
show-parameters: | ||
name: Parameters for testing "${{ github.event.inputs.module }}" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Log workflow parameters | ||
env: | ||
WORKFLOW_PARAMETERS: ${{ toJSON(github.event.inputs) }} | ||
run: echo "$WORKFLOW_PARAMETERS" | ||
|
||
test-module: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
node-version: | ||
- 10.x | ||
- 12.x | ||
- 14.x | ||
- 15.x | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.inputs.repository }} | ||
ref: ${{ github.event.inputs.ref }} | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install packages | ||
run: npm install | ||
|
||
- name: Run CITGM | ||
run: node bin/citgm.js ${{ github.event.inputs.module }} |