/ci.yml affected parallel Secret
Created
September 16, 2022 16:53
Star
You must be signed in to star a gist
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 | |
env: | |
# Branching | |
is-merge: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | |
is-pull-request: ${{ github.event_name == 'pull_request' }} | |
# Node.js | |
NODE_OPTIONS: --max-old-space-size=6144 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
with: | |
# Required by nrwl/nx-set-shas | |
fetch-depth: 0 | |
- name: | |
'Derive appropriate SHAs for base and head for `nx affected` commands' | |
uses: nrwl/nx-set-shas@v2 | |
- name: Set up dependencies | |
uses: ./.github/actions/setup-dependencies | |
- name: 'Build application if affected by changes in feature branch' | |
run: yarn affected:build | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
with: | |
# Required by nrwl/nx-set-shas | |
fetch-depth: 0 | |
- name: | |
'Derive appropriate SHAs for base and head for `nx affected` commands' | |
uses: nrwl/nx-set-shas@v2 | |
- name: Set up dependencies | |
uses: ./.github/actions/setup-dependencies | |
- name: Lint Nx workspace | |
run: yarn nx workspace-lint | |
- name: 'Lint workspace and affected projects' | |
run: yarn affected:lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
with: | |
# Required by nrwl/nx-set-shas | |
fetch-depth: 0 | |
- name: | |
'Derive appropriate SHAs for base and head for `nx affected` commands' | |
uses: nrwl/nx-set-shas@v2 | |
- name: Set up dependencies | |
uses: ./.github/actions/setup-dependencies | |
- name: 'Test affected projects' | |
run: yarn test | |
e2e: | |
name: End-to-end test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
with: | |
# Required by nrwl/nx-set-shas | |
fetch-depth: 0 | |
- name: | |
'Derive appropriate SHAs for base and head for `nx affected` commands' | |
uses: nrwl/nx-set-shas@v2 | |
- name: Set up dependencies | |
uses: ./.github/actions/setup-dependencies | |
- name: | |
'End-to-end test application if affected by changes in feature | |
branch' | |
run: yarn affected:e2e --configuration=ci-production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment