Updating release script #39
Workflow file for this run
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: BAML Runtime | |
on: | |
pull_request: | |
branches: | |
- canary | |
push: | |
paths: | |
- "engine/**" | |
- ".github/workflows/primary.yml" | |
branches: | |
- canary | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pull-requests: read | |
repository-projects: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for NO_CI_CHECKS | |
run: | | |
CHECK_COMMIT=$(echo "${{ github.event.head_commit.message }}" | grep -c 'NO_CI_CHECKS=true') | |
if [ "${{ github.event_name }}" = "pull_request" ]; then | |
CHECK_PR=$(echo "${{ github.event.pull_request.body }}" | grep -c 'NO_CI_CHECKS=true') | |
else | |
CHECK_PR=0 | |
fi | |
if [ "$CHECK_COMMIT" -gt 0 ] || [ "$CHECK_PR" -gt 0 ]; then | |
echo "NO_CI_CHECKS=true found, skipping job." | |
exit 0 | |
fi | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9.0.6 | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
cache-dependency-path: | | |
typescript/**/pnpm-lock.yaml | |
- name: Install Node | |
run: pnpm install --frozen-lockfile | |
working-directory: typescript | |
- name: Check TS Lint | |
run: pnpm biome ci . --organize-imports-enabled=false | |
working-directory: typescript | |
test_node_generator: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for NO_CI_CHECKS | |
run: | | |
CHECK_COMMIT=$(echo "${{ github.event.head_commit.message }}" | grep -c 'NO_CI_CHECKS=true') | |
if [ "${{ github.event_name }}" = "pull_request" ]; then | |
CHECK_PR=$(echo "${{ github.event.pull_request.body }}" | grep -c 'NO_CI_CHECKS=true') | |
else | |
CHECK_PR=0 | |
fi | |
if [ "$CHECK_COMMIT" -gt 0 ] || [ "$CHECK_PR" -gt 0 ]; then | |
echo "NO_CI_CHECKS=true found, skipping job." | |
exit 0 | |
fi | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9.0.6 | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
cache-dependency-path: | | |
engine/language_client_typescript/pnpm-lock.yaml | |
integ-tests/typescript/pnpm-lock.yaml | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: engine | |
- name: Install Node | |
run: pnpm install --frozen-lockfile | |
working-directory: engine/language_client_typescript | |
- name: Build Node | |
run: pnpm build | |
working-directory: engine/language_client_typescript | |
- name: Install Node | |
run: pnpm install --frozen-lockfile | |
working-directory: integ-tests/typescript | |
- name: Test Node Generator | |
run: pnpm generate | |
working-directory: integ-tests/typescript | |
- name: Ensure No Changes | |
run: git diff --exit-code | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for NO_CI_CHECKS | |
run: | | |
CHECK_COMMIT=$(echo "${{ github.event.head_commit.message }}" | grep -c 'NO_CI_CHECKS=true') | |
if [ "${{ github.event_name }}" = "pull_request" ]; then | |
CHECK_PR=$(echo "${{ github.event.pull_request.body }}" | grep -c 'NO_CI_CHECKS=true') | |
else | |
CHECK_PR=0 | |
fi | |
if [ "$CHECK_COMMIT" -gt 0 ] || [ "$CHECK_PR" -gt 0 ]; then | |
echo "NO_CI_CHECKS=true found, skipping job." | |
exit 0 | |
fi | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: engine | |
- name: Build Rust | |
run: cargo build | |
working-directory: engine | |
- name: Test Rust | |
run: cargo test | |
working-directory: engine |