CI/CD Pipeline #80
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
| name: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| lint-markdown: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install markdownlint | |
| run: npm install -g markdownlint-cli2 | |
| - name: Lint Markdown | |
| run: markdownlint-cli2 "**/*.md" --config .markdownlint.json | |
| lint-shell: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ShellCheck | |
| uses: ludeeus/action-shellcheck@master | |
| with: | |
| check_together: 'yes' | |
| scandir: "scripts/" | |
| test-powershell: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Pester | |
| shell: pwsh | |
| run: Install-Module -Name Pester -Force -SkipPublisherCheck -Scope CurrentUser | |
| - name: Run Tests | |
| shell: pwsh | |
| run: Invoke-Pester ./tests -CI -Output Detailed -ErrorAction Stop | |
| test-python: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest ruff | |
| - name: Lint | |
| run: ruff check scripts/python/ || echo "No Python files to lint" | |
| - name: Test | |
| run: pytest tests/ -v || echo "No tests to run" | |
| test-node: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install dependencies | |
| run: | | |
| cd scripts/node | |
| npm ci || npm install | |
| - name: Test | |
| run: | | |
| cd scripts/node | |
| npm test |