most recent setup python action #4
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: "Test: Alamos" | |
on: | |
pull_request: | |
branches: | |
- rc | |
- main | |
push: | |
branches: | |
- rc | |
- main | |
- sy-1375-run-ci-tests-on-windows-and-macos | |
workflow_dispatch: | |
jobs: | |
changes: | |
name: Changes | |
runs-on: ubuntu-latest | |
outputs: | |
go: ${{ steps.filter.outputs.go }} | |
py: ${{ steps.filter.outputs.py }} | |
ts: ${{ steps.filter.outputs.ts }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Diff Changes | |
uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
shared: &shared | |
- .github/workflows/test.alamos.yaml | |
go: | |
- *shared | |
- alamos/go/** | |
- x/go/** | |
py: | |
- *shared | |
- alamos/py/** | |
ts: | |
- *shared | |
- alamos/ts/** | |
- configs/eslint/** | |
- configs/stylelint/** | |
- configs/ts/** | |
- configs/vite/** | |
- x/ts/** | |
go: | |
name: Go (${{ matrix.os }}) | |
needs: changes | |
if: needs.changes.outputs.go == 'true' | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.work | |
cache-dependency-path: | | |
alamos/go/go.sum | |
x/go/go.sum | |
- name: Test | |
run: go test -v -shuffle=on ./... | |
working-directory: alamos/go | |
py: | |
name: Python (${{ matrix.os }}) | |
needs: changes | |
if: needs.changes.outputs.py == 'true' | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: alamos/py/pyproject.toml | |
cache: poetry | |
- name: Install Dependencies | |
run: poetry install | |
working-directory: alamos/py | |
- name: Test | |
run: poetry run pytest | |
working-directory: alamos/py | |
ts: | |
name: TypeScript (${{ matrix.os }}) | |
needs: changes | |
if: needs.changes.outputs.ts == 'true' | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
lint: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build:alamos | |
- name: Test | |
run: pnpm test:alamos | |
- name: Lint | |
if: matrix.lint == true | |
run: pnpm lint:alamos |