Skip to content

ci: update all ci + cd workflows #2004

ci: update all ci + cd workflows

ci: update all ci + cd workflows #2004

Workflow file for this run

name: Test - X
on:
pull_request:
branches:
- main
- rc
push:
branches:
- main
- rc
- 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 }}
ts: ${{ steps.filter.outputs.ts }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Diff Changes
uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
filters: |
shared: &shared
- .github/workflows/text.x.yaml
go:
- *shared
- alamos/go/**
- x/go/**
ts:
- *shared
- configs/eslint/**
- configs/ts/**
- configs/vite/**
- x/ts/**
go:
name: Go (${{ matrix.os }})
needs: changes
if: needs.changes.outputs.go == 'true'
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
format: true
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: Test
run: go test -v -shuffle=on ./...
working-directory: x/go
- name: Check Formatting
if: matrix.format
run: scripts/gofmt-check.sh x/go
ts:
name: TypeScript (${{ matrix.os }})
needs: changes
if: needs.changes.outputs.ts == 'true'
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-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:x
- name: Test
run: pnpm test:x
- name: Lint
if: matrix.lint
run: pnpm lint:x