CI #457
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: CI | |
"on": | |
push: | |
branches: | |
- trunk | |
pull_request: | |
branches: | |
- trunk | |
schedule: | |
- cron: "0 0 * * TUE" | |
jobs: | |
test: | |
name: Integration test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
with: | |
repository: artichoke/artichoke | |
# This ref is guaranteed to have C source files | |
ref: 98c9f2921d4220a793b6b8cbe87252505b2f2385 | |
path: artichoke-integration-test | |
- name: Setup Node.js runtime | |
uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: "lts/*" | |
- name: Install Nodejs toolchain | |
run: npm ci | |
- name: Run locally | |
run: node ./bin/clang-format.js --check artichoke-integration-test | |
- name: Run locally with npx | |
if: runner.os != 'Windows' | |
run: npx -p . clang-format --check artichoke-integration-test | |
- name: Run locally with npx and inferred target directory | |
if: runner.os != 'Windows' | |
run: npx -p .. clang-format --check --ignore-path ../.clang-format-ignore | |
working-directory: "artichoke-integration-test" | |
js: | |
name: Lint and format JS | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
- name: Setup Node.js runtime | |
uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: "lts/*" | |
- name: Install Nodejs toolchain | |
run: npm ci | |
- name: Lint and check formatting with eslint | |
run: npm run lint | |
text: | |
name: Lint and format text | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.2.2 | |
- name: Setup Node.js runtime | |
uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: "lts/*" | |
- name: Install Nodejs toolchain | |
run: npm ci | |
- name: Lint and check formatting with prettier | |
run: npx prettier --check '**/*' | |
- name: Lint YAML sources with yamllint | |
run: | | |
yamllint --version | |
echo "Linting YAML sources with yamllint ..." | |
yamllint --strict --format github . | |
echo "OK" |