Skip to content

Commit

Permalink
try a fix for tmpdir on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mjameswh committed Nov 30, 2024
1 parent 89c307d commit 19fe980
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ jobs:
run:
shell: bash
steps:
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true

- name: 'Checkout code'
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -146,6 +141,10 @@ jobs:
run:
shell: bash
steps:
- id: tmp-dir
run: echo "dir=$(pwd)" >> ${GITHUB_OUTPUT}
working-directory: ${{ runner.temp }}

- name: 'Checkout code'
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -183,7 +182,7 @@ jobs:
run: npm run build -- --ignore @temporalio/core-bridge

- name: Publish to Verdaccio
run: node scripts/publish-to-verdaccio.js --registry-dir $TMPDIR/npm-registry
run: node scripts/publish-to-verdaccio.js --registry-dir ${{ steps.tmp-dir.outputs.dir }}/npm-registry

- name: Install Temporal CLI
uses: temporalio/setup-temporal@v0
Expand All @@ -199,7 +198,7 @@ jobs:
# We write the certs to disk because it serves the sample. Written into /tmp/temporal-certs
- name: Create certs dir
run: node scripts/create-certs-dir.js "$TMPDIR/certs"
run: node scripts/create-certs-dir.js ${{ steps.tmp-dir.outputs.dir }}/certs
if: ${{ vars.TEMPORAL_CLIENT_NAMESPACE != '' }}

- name: Run Tests
Expand All @@ -218,34 +217,34 @@ jobs:
# Sample 1: hello-world to local server
- name: Instantiate sample project using verdaccio artifacts - Hello World
run: |
node scripts/init-from-verdaccio.js --registry-dir $TMPDIR/npm-registry --sample https://github.com/temporalio/samples-typescript/tree/main/hello-world --target-dir $TMPDIR/sample-hello-world
node scripts/test-example.js --work-dir "$TMPDIR/sample-hello-world"
node scripts/init-from-verdaccio.js --registry-dir ${{ steps.tmp-dir.outputs.dir }}/npm-registry --sample https://github.com/temporalio/samples-typescript/tree/main/hello-world --target-dir ${{ steps.tmp-dir.outputs.dir }}/sample-hello-world
node scripts/test-example.js --work-dir "${{ steps.tmp-dir.outputs.dir }}/sample-hello-world"
# Sample 2: hello-world-mtls to cloud server
- name: Instantiate sample project using verdaccio artifacts - Hello World MTLS
if: ${{ vars.TEMPORAL_CLIENT_NAMESPACE != '' }}
run: |
node scripts/init-from-verdaccio.js --registry-dir $TMPDIR/npm-registry --sample https://github.com/temporalio/samples-typescript/tree/main/hello-world-mtls --target-dir $TMPDIR/sample-hello-world-mtls
node scripts/test-example.js --work-dir "$TMPDIR/sample-hello-world-mtls"
node scripts/init-from-verdaccio.js --registry-dir ${{ steps.tmp-dir.outputs.dir }}/npm-registry --sample https://github.com/temporalio/samples-typescript/tree/main/hello-world-mtls --target-dir ${{ steps.tmp-dir.outputs.dir }}/sample-hello-world-mtls
node scripts/test-example.js --work-dir "${{ steps.tmp-dir.outputs.dir }}/sample-hello-world-mtls"
env:
# These env vars are used by the hello-world-mtls sample
TEMPORAL_ADDRESS: ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}.tmprl.cloud
TEMPORAL_NAMESPACE: ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
TEMPORAL_CLIENT_CERT_PATH: $TMPDIR/certs/client.pem
TEMPORAL_CLIENT_KEY_PATH: $TMPDIR/certs/client.key
TEMPORAL_CLIENT_CERT_PATH: ${{ steps.tmp-dir.outputs.dir }}/certs/client.pem
TEMPORAL_CLIENT_KEY_PATH: ${{ steps.tmp-dir.outputs.dir }}/certs/client.key
TEMPORAL_TASK_QUEUE: ${{ format('{0}-{1}-sample-hello-world-mtls', matrix.platform, matrix.node) }}

# Sample 3: fetch-esm to local server
- name: Instantiate sample project using verdaccio artifacts - Fetch ESM
run: |
node scripts/init-from-verdaccio.js --registry-dir $TMPDIR/npm-registry --sample https://github.com/temporalio/samples-typescript/tree/main/fetch-esm --target-dir $TMPDIR/sample-fetch-esm
node scripts/test-example.js --work-dir "$TMPDIR/sample-fetch-esm"
node scripts/init-from-verdaccio.js --registry-dir ${{ steps.tmp-dir.outputs.dir }}/npm-registry --sample https://github.com/temporalio/samples-typescript/tree/main/fetch-esm --target-dir ${{ steps.tmp-dir.outputs.dir }}/sample-fetch-esm
node scripts/test-example.js --work-dir "${{ steps.tmp-dir.outputs.dir }}/sample-fetch-esm"
# End samples

- name: Destroy certs dir
if: always()
run: rm -rf $TMPDIR/certs
run: rm -rf ${{ steps.tmp-dir.outputs.dir }}/certs
continue-on-error: true

- name: Upload NPM logs
Expand Down

0 comments on commit 19fe980

Please sign in to comment.