Skip to content

Commit

Permalink
ci: Updated PR workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Nov 20, 2023
1 parent d4c3c18 commit 58b0c08
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

jobs:

pr:
prepare-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -28,6 +28,31 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install

pr:
needs: prepare-env
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [ 'build', 'e2e' ]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 20.x

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache node modules
id: cache
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ env.DEPENDENCIES_CACHE }}-${{ hashFiles('yarn.lock') }}

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: ./actions/set-shas
with:
Expand All @@ -39,16 +64,12 @@ jobs:
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: nx affected:version
if: matrix.target == 'build'
uses: ./actions/run-many
with:
target: version

- name: nx affected:build
uses: ./actions/run-many
with:
target: build

- name: nx affected:e2e
- name: nx affected:${{ matrix.target }}
uses: ./actions/run-many
with:
target: e2e
target: ${{ matrix.target }}

0 comments on commit 58b0c08

Please sign in to comment.