ci: refactor ci into smaller workflows that trigger only for specific… #1
This file contains hidden or 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
# | |
# Flowmotion | |
# CI/CD Pipeline | |
# Pipeline | |
# | |
name: Flowmotion Pipeline CI/CD | |
on: | |
push: | |
paths: | |
- .github/workflows/pipeline-ci.yaml | |
- "pipeline/**" | |
jobs: | |
pipeline: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [lint, test] | |
name: "${{ matrix.target }} Pipeline" | |
defaults: | |
run: | |
working-directory: pipeline | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10.13" | |
# cache pip dependencies | |
cache: "pip" | |
- name: Install Pip dependencies | |
run: pip install -r requirements.txt | |
- uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: "${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}" | |
- name: "${{ matrix.target }} Pipeline" | |
run: "make ${{ matrix.target }}" | |
schema: | |
name: "Validate JSON Schema" | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: schema | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.9.x | |
# cache npm dependencies | |
cache: npm | |
cache-dependency-path: schema/package-lock.json | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Validate json schema | |
run: npx ajv compile -s "*.schema.json" --spec=draft2020 -c ajv-formats |