Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(utils): workspace file path is not resolved (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnetzer authored Mar 6, 2022
1 parent 5494dfd commit b67e4c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 22 deletions.
29 changes: 8 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ jobs:
hasChanges: ${{ steps.affected.outputs.hasChanges }}
matrix: ${{ steps.affected.outputs.matrix }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: e-square-io/.github/.github/actions/npm-ci@main

- name: Calculate Affected Projects
uses: e-square-io/nx-affected-matrix@v2
id: affected
Expand Down Expand Up @@ -67,9 +61,6 @@ jobs:
if: ${{ fromJSON(needs.setup.outputs.hasChanges) && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
needs: [setup, execute]
runs-on: ubuntu-latest
outputs:
hasChanges: ${{ steps.affected.outputs.hasChanges || needs.setup.outputs.hasChanges }}
matrix: ${{ steps.affected.outputs.matrix || needs.setup.outputs.matrix }}
steps:
- uses: actions/checkout@v2

Expand All @@ -85,17 +76,13 @@ jobs:
with:
targets: build
maxDistribution: 1
debug: true
# debug: true

e2e-execute:
name: E2E nx-distributed-task [${{ matrix.target }} (${{ matrix.distribution }})]
if: ${{ fromJSON(needs.e2e-distribute.outputs.hasChanges) && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && contains(needs.setup.outputs.matrix, 'nx-distributed-task') }}
needs: [setup,e2e-distribute]
name: E2E nx-distributed-task
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && contains(needs.setup.outputs.matrix, 'nx-distributed-task') }}
needs: [setup, execute]
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.target == 'test' }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.e2e-distribute.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -111,10 +98,10 @@ jobs:
uses: ./dist/packages/nx-distributed-task
id: run
with:
target: ${{ matrix.target }}
distribution: ${{ matrix.distribution }}
projects: ${{ matrix.projects }}
debug: true
target: build
distribution: 1
projects: 'nx-affected-matrix'
# debug: true

release:
name: Release version
Expand Down
1 change: 1 addition & 0 deletions packages/nx-affected-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ runs:
const { default: setEnv } = require('${{ github.action_path }}/set-env.js');
const { default: main } = require('${{ github.action_path }}/main.js');
console.log(JSON.stringify(process.env, null, 2));
setEnv(${{ toJSON(inputs) }}, process);
await main(context, core);
2 changes: 1 addition & 1 deletion packages/utils/src/lib/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class GHTree implements Tree {
}

resolve(path: string): string {
return resolve(this.root, path);
return resolve(this.root, path.startsWith('/') ? path.slice(1) : path);
}

getLockFilePath(): string | void {
Expand Down

0 comments on commit b67e4c0

Please sign in to comment.