feat: choice presenter persistence #69
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
actions: read | |
contents: read | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
# Set NX_BASE and NX_HEAD explicitly for pull requests | |
- name: Set NX_BASE and NX_HEAD for PR | |
if: github.event_name == 'pull_request' | |
run: | | |
echo "NX_BASE=$GITHUB_BASE_REF" >> $GITHUB_ENV | |
echo "NX_HEAD=$GITHUB_HEAD_REF" >> $GITHUB_ENV | |
echo "NX_BASE="$NX_BASE | |
echo "NX_HEAD="$NX_HEAD | |
# Set NX_BASE and NX_HEAD for direct commits | |
- name: Set NX_BASE and NX_HEAD for direct commits | |
if: github.event_name == 'push' | |
run: | | |
BASE_SHA=$(git rev-parse HEAD~1) | |
HEAD_SHA=$(git rev-parse HEAD) | |
echo "NX_BASE=$BASE_SHA" >> $GITHUB_ENV | |
echo "NX_HEAD=$HEAD_SHA" >> $GITHUB_ENV | |
- run: bun install --no-cache | |
- uses: nrwl/nx-set-shas@v4 | |
- run: bun run commitlint --from=$NX_BASE --to=$NX_HEAD | |
- run: bun run format:check | |
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud | |
# - run: bun nx-cloud record -- echo Hello World | |
- run: bun nx affected -t lint test build test-feature --base=$NX_BASE --head=$NX_HEAD --parallel --maxParallel=3 |