chore(ci): add dependency update ignores #175
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: CI | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
workflow_dispatch: | |
concurrency: | |
group: ci-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
CI: true | |
LTS_NODE_VERSION: 20 | |
IS_PULL_REQUEST_TO_MAIN: | |
${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' && 'true' || 'false' }} | |
TURBO_LOG_ORDER: stream | |
TURBO_TOKEN: | |
${{ !(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') && | |
secrets.TURBO_REMOTE_CACHE_TOKEN || '' }} | |
TURBO_TEAM: | |
${{ !(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') && | |
secrets.TURBO_REMOTE_CACHE_TEAM || '' }} | |
INSTALL_OPTIONS: | |
${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'main' && '"...[HEAD^1]"' || '' }} | |
BUILD_OPTIONS: | |
${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'main' && '"{./apps/*}[HEAD^1]^..." | |
"{./packages/*}[HEAD^1]..."' || './packages/*' }} | |
jobs: | |
ci-general: | |
name: CI General | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set up Zimic | |
id: zimic-setup | |
uses: ./.github/actions/zimic-setup | |
with: | |
node-version: ${{ env.LTS_NODE_VERSION }} | |
turbo-token: ${{ env.TURBO_TOKEN }} | |
turbo-team: ${{ env.TURBO_TEAM }} | |
install: ${{ env.INSTALL_OPTIONS }} | |
build: ${{ env.BUILD_OPTIONS }} | |
build-node-env: ${{ env.IS_PULL_REQUEST_TO_MAIN == 'false' && 'development' || 'production' }} | |
install-playwright-browsers: true | |
- name: Check formatting style | |
uses: ./.github/actions/zimic-style-check | |
with: | |
node-version: ${{ env.LTS_NODE_VERSION }} | |
- name: Lint code and check types | |
run: | | |
pnpm turbo \ | |
types:check lint:turbo \ | |
--continue \ | |
--concurrency 100% \ | |
${{ steps.zimic-setup.outputs.install-filters }} | |
ci-node: | |
name: CI Node.js | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: | |
- 18 | |
- 20 | |
- 22 | |
env: | |
NODE_VERSION: ${{ matrix.node-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set up Zimic | |
id: zimic-setup | |
uses: ./.github/actions/zimic-setup | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
turbo-token: ${{ env.TURBO_TOKEN }} | |
turbo-team: ${{ env.TURBO_TEAM }} | |
install: ${{ env.INSTALL_OPTIONS }} | |
build: ${{ env.BUILD_OPTIONS }} | |
build-node-env: ${{ env.IS_PULL_REQUEST_TO_MAIN == 'false' && 'development' || 'production' }} | |
install-playwright-browsers: true | |
- name: Run tests | |
run: | | |
pnpm turbo \ | |
test:turbo \ | |
--continue \ | |
--concurrency 1 \ | |
${{ steps.zimic-setup.outputs.install-filters }} | |
ci-typescript: | |
name: CI TypeScript | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
typescript-version: | |
- '4.7' | |
- '4.8' | |
- '4.9' | |
- '5.0' | |
- '5.1' | |
- '5.2' | |
- '5.3' | |
- '5.4' | |
env: | |
TYPESCRIPT_VERSION: ${{ matrix.typescript-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set up Zimic | |
id: zimic-setup | |
uses: ./.github/actions/zimic-setup | |
with: | |
node-version: ${{ env.LTS_NODE_VERSION }} | |
turbo-token: ${{ env.TURBO_TOKEN }} | |
turbo-team: ${{ env.TURBO_TEAM }} | |
install: ${{ env.INSTALL_OPTIONS }} | |
build: ${{ env.BUILD_OPTIONS }} | |
build-node-env: ${{ env.IS_PULL_REQUEST_TO_MAIN == 'false' && 'development' || 'production' }} | |
install-playwright-browsers: false | |
- name: Set TypeScript version | |
run: | | |
pnpm update \ | |
typescript@${{ matrix.typescript-version }} \ | |
--recursive \ | |
${{ steps.zimic-setup.outputs.install-filters }} \ | |
--filter !zimic \ | |
--filter !@zimic/* | |
- name: Check types | |
run: | | |
pnpm turbo \ | |
types:check \ | |
--continue \ | |
--concurrency 100% \ | |
${{ steps.zimic-setup.outputs.install-filters }} \ | |
--filter !zimic \ | |
--filter !@zimic/* \ | |
$([[ '${{ matrix.typescript-version }}' =~ ^4\. ]] && \ | |
echo '--filter !zimic-example-with-jest-node --filter !zimic-example-with-vitest-node') \ | |
$([[ '${{ matrix.typescript-version }}' =~ ^(4\.|5\.0) ]] && \ | |
echo '--filter !zimic-example-with-playwright --filter !zimic-example-with-next-js-app --filter !zimic-example-with-next-js-pages') |