Merge pull request #106 from python-project-templates/tkp/upd #141
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: Build Status | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| template: | |
| - python | |
| # - cpp | |
| - js | |
| - jupyter | |
| - rust | |
| - rustjswasm | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Prework | |
| run: | | |
| # python | |
| touch pyproject.toml | |
| # node | |
| echo '{"name": "a", "version": "0.0.0", "scripts": {}}' > package.json | |
| printf 'lockfileVersion: '9.0'\nsettings:\n\tautoInstallPeers: true\n\texcludeLinksFromLockfile: false\nimporters:\n.: {}' > pnpm-lock.yaml | |
| # rust | |
| printf '[package]\nname = "rust"\nversion = "0.1.0"\nedition = "2021"\n[dependencies]\n' > Cargo.toml | |
| mkdir -p src | |
| printf 'fn main() {\n println!("Hello, world!");\n}\n' > src/main.rs | |
| - uses: actions-ext/python/setup@main | |
| with: | |
| version: '3.11' | |
| - run: uv pip install copier | |
| - uses: actions-ext/node/setup@main | |
| with: | |
| version: 22.x | |
| js_folder: "." | |
| - uses: actions-ext/rust/setup@main | |
| - run: | | |
| pnpm install | |
| cargo build | |
| - run: | | |
| make gen-${{matrix.template}} | |
| make test-${{matrix.template}} |