Skip to content

Commit

Permalink
Merge pull request #1278 from actions/fhammerl/node-v16-and-toolkit-f…
Browse files Browse the repository at this point in the history
…ixes

Migrate dev environment and workflows to node16
  • Loading branch information
fhammerl committed Jan 3, 2023
2 parents 86fe4ab + 4ea0831 commit f5024e4
Show file tree
Hide file tree
Showing 15 changed files with 2,904 additions and 1,945 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/artifact-tests.yml
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

# In order to upload & download artifacts from a shell script, certain env variables need to be set that are only available in the
# node context. This runs a local action that gets and sets the necessary env variables that are needed
Expand Down Expand Up @@ -55,16 +55,16 @@ jobs:
- name: Create files that will be uploaded
run: |
mkdir artifact-path
echo ${{ env.non-gzip-artifact-content }} > artifact-path/world.txt
echo ${{ env.gzip-artifact-content }} > artifact-path/gzip.txt
echo '${{ env.non-gzip-artifact-content }}' > artifact-path/world.txt
echo '${{ env.gzip-artifact-content }}' > artifact-path/gzip.txt
touch artifact-path/empty.txt
# We're using node -e to call the functions directly available in the @actions/artifact package
- name: Upload artifacts using uploadArtifact()
run: |
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-1',['artifact-path/world.txt'], '${{ github.workspace }}'))"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-2',['artifact-path/gzip.txt'], '${{ github.workspace }}'))"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-3',['artifact-path/empty.txt'], '${{ github.workspace }}'))"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-1',['artifact-path/world.txt'], process.argv[1]))" "${{ github.workspace }}"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-2',['artifact-path/gzip.txt'], process.argv[1]))" "${{ github.workspace }}"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-3',['artifact-path/empty.txt'], process.argv[1]))" "${{ github.workspace }}"
- name: Download artifacts using downloadArtifact()
run: |
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/audit.yml
Expand Up @@ -20,20 +20,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: npm install
run: npm install

- name: Bootstrap
run: npm run bootstrap

- name: audit tools
# `|| npm audit` to pretty-print the output if vulnerabilies are found after filtering.
run: npm audit --audit-level=moderate --json | scripts/audit-allow-list || npm audit --audit-level=moderate
- name: audit tools (without allow-list)
run: npm audit --audit-level=moderate

- name: audit packages
run: npm run audit-all
4 changes: 2 additions & 2 deletions .github/workflows/cache-tests.yml
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

# In order to save & restore cache from a shell script, certain env variables need to be set that are only available in the
# node context. This runs a local action that gets and sets the necessary env variables that are needed
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/releases.yml
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: verify package exists
run: ls packages/${{ github.event.inputs.package }}

- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: npm install
run: npm install
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit-tests.yml
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: npm install
run: npm install
Expand All @@ -40,7 +40,7 @@ jobs:
run: npm run build

- name: npm test
run: npm test
run: npm test -- --runInBand
env:
GITHUB_TOKEN: ${{ github.token }}

Expand Down

0 comments on commit f5024e4

Please sign in to comment.