Skip to content

Commit

Permalink
Update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
pjdotson committed Feb 4, 2025
1 parent 7190710 commit 0d40e86
Show file tree
Hide file tree
Showing 14 changed files with 367 additions and 506 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test.alamos.go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test - Alamos (Go)

on:
push:
branches:
- main
pull_request:
branches:
- main
- rc
paths:
- .github/workflows/test.alamos.go.yaml
- alamos/go/**
- x/go/**
workflow_dispatch:

jobs:
test:
name: Test (${{ matrix.os }})
strategy:
matrix:
include:
- os: ubuntu-latest
format: true
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'macos-latest' }}
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'windows-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: go.work.sum

- name: Format
if: matrix.format
run: scripts/gofmt-check.sh alamos/go

- name: Test
run: go test -v -shuffle=on ./...
working-directory: alamos/go
51 changes: 51 additions & 0 deletions .github/workflows/test.alamos.py.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test - Alamos (Python)

on:
push:
branches:
- main
pull_request:
branches:
- main
- rc
paths:
- .github/workflows/test.alamos.py.yaml
- alamos/py/**
workflow_dispatch:

jobs:
test:
name: Test (${{ matrix.os }})
strategy:
matrix:
include:
- os: ubuntu-latest
format: true
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'macos-latest' }}
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'windows-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: Format
if: matrix.format
run: poetry run black --check --diff --color .
working-directory: alamos/py

- name: Test
run: poetry run pytest
working-directory: alamos/py
55 changes: 55 additions & 0 deletions .github/workflows/test.alamos.ts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test - Alamos (TypeScript)

on:
push:
branches:
- main
pull_request:
branches:
- main
- rc
paths:
- .github/workflows/test.alamos.ts.yaml
- alamos/ts/**
- configs/eslint/**
- configs/ts/**
- configs/vite/**
- x/ts/**
workflow_dispatch:

jobs:
test:
name: Test (${{ matrix.os }})
strategy:
matrix:
include:
- os: ubuntu-latest
lint: true
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'macos-latest' }}
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'windows-latest' }}
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

- name: Install Dependencies
run: pnpm install

- name: Lint
if: matrix.lint
run: pnpm lint:alamos

- name: Build
run: pnpm build:alamos

- name: Test
run: pnpm test:alamos
159 changes: 0 additions & 159 deletions .github/workflows/test.alamos.yaml

This file was deleted.

34 changes: 7 additions & 27 deletions .github/workflows/test.cesium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,23 @@ on:
branches:
- main
- rc
paths:
- .github/workflows/test.cesium.yaml
- alamos/go/**
- cesium/**
- x/go/**
workflow_dispatch:

jobs:
changes:
name: Changes
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Diff Changes
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
filters: |
changed:
- .github/workflows/test.cesium.yaml
- alamos/go/**
- cesium/**
- x/go/**
test:
name: Test (${{ matrix.os }})
needs: changes
if: needs.changes.outputs.changed == 'true'
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
format: true
exclude:
- os: ${{ (github.ref != 'refs/heads/main' && github.base_ref != 'main') && 'macos-latest' }}
- os: ${{ (github.ref != 'refs/heads/main' && github.base_ref != 'main') && 'windows-latest' }}
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'macos-latest' }}
- os: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'windows-latest' }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
Expand Down
Loading

0 comments on commit 0d40e86

Please sign in to comment.