Check CML GitHub Action #1338
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: Check CML GitHub Action | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
pull_request: | |
permissions: | |
contents: write | |
pull-requests: write | |
checks: write | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
npm ci | |
npm run format | |
npm run lint | |
npm run build | |
git diff --exit-code | |
test-latest: | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
max-parallel: 1 | |
matrix: | |
system: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: run action with latest | |
uses: ./ | |
- name: test | |
run: cml --version | |
- name: test CML | |
env: | |
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo 'Hello CML from ${{ matrix.system }}!' > report.md | |
cml comment create report.md | |
cml check create report.md | |
test-version: | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
max-parallel: 1 | |
matrix: | |
system: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: run action with latest | |
uses: ./ | |
with: | |
version: v0.15.1 | |
- name: test CML specific version | |
run: | | |
if [ "$(cml --version 2>&1)" != '0.15.1' ]; then | |
exit 1 | |
fi | |
echo OK | |
test-version-prefix: | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
max-parallel: 1 | |
matrix: | |
system: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: run action with latest | |
uses: ./ | |
with: | |
version: 0.15.1 | |
- name: test CML specific version | |
run: | | |
if [ "$(cml --version 2>&1)" != '0.15.1' ]; then | |
exit 1 | |
fi | |
echo OK |