Skip to content

Commit

Permalink
use version node on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codes committed Nov 21, 2023
1 parent bf9e607 commit 7118f18
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ppe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
- name: Install jq
run: curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | ./jq.exe .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
run: echo "##[set-output name=NODE_VERSION;]20.9.0"
id: nvm
- name: Use Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Install jq
run: curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | ./jq.exe .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
run: echo "##[set-output name=NODE_VERSION;]20.9.0"
id: nvm
- name: Use Node.js
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Install jq
run: curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
run: echo "##[set-output name=NODE_VERSION;]20.9.0"
id: nvm
- name: Use Node.js
uses: actions/setup-node@v3
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/pull-request-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ jobs:
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --parallel --verbose --projects=tag:linux

unit_tests_windows:
name: Verify PR - Tests (Windows)
runs-on: windows-latest
package_linux:
name: Package (Linux)
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install jq
run: curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
fetch-depth: 2
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
id: nvm
Expand All @@ -53,9 +51,6 @@ jobs:
- uses: actions/setup-dotnet@v2
with:
dotnet-version: "8.0.100"
- name: Enable yarn
run: corepack enable
- run: corepack prepare --activate yarn@^4.0.0
- name: Install deps
run: yarn
- name: Prepare
Expand All @@ -64,18 +59,31 @@ jobs:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --parallel --verbose --projects=tag:windows

package_linux:
name: Package (Linux)
runs-on: self-hosted
- name: Package apps
run: yarn nx affected --target=package --parallel --base=HEAD~ --head=HEAD --verbose --projects=tag:linux
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
NODE_ENV: production
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: packaged-apps
path: apps/*/.packaged

unit_tests_windows:
name: Verify PR - Tests (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
fetch-depth: 0
- name: Install jq
run: curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
run: echo "##[set-output name=NODE_VERSION;]20.9.0"
id: nvm
- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -84,6 +92,9 @@ jobs:
- uses: actions/setup-dotnet@v2
with:
dotnet-version: "8.0.100"
- name: Enable yarn
run: corepack enable
- run: corepack prepare --activate yarn@^4.0.0
- name: Install deps
run: yarn
- name: Prepare
Expand All @@ -92,19 +103,8 @@ jobs:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}

- name: Package apps
run: yarn nx affected --target=package --parallel --base=HEAD~ --head=HEAD --verbose --projects=tag:linux
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
NODE_ENV: production
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: packaged-apps
path: apps/*/.packaged
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --parallel --verbose --projects=tag:windows

package_windows:
name: Package (Windows)
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Install jq
run: curl -L -o jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
run: echo "##[set-output name=NODE_VERSION;]20.9.0"
id: nvm
- name: Use Node.js
uses: actions/setup-node@v3
Expand Down

0 comments on commit 7118f18

Please sign in to comment.