Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit f232d2e

Browse files
committed
Merge branch 'master' into releases/v1
* master: Extend timeout for Jest tests Update dependencies with vulnerabilities ci: install node v16 instead of v12 Bump ansi-regex from 5.0.0 to 5.0.1 Update check-dist to run against master Create check-dist.yml fix: bump up nodejs to v16 Bump tmpl from 1.0.4 to 1.0.5 Bump path-parse from 1.0.6 to 1.0.7 Pin glob-parent >= vulnerability fix Update @actions/core to 1.4.0 Update dev dependencies chore: update metadata in package.json test: bump up Jest to v27 introducing new defaults build: bump up ncc to the latest ver Update RELEASING.md
2 parents e6e38ba + 9aa31f2 commit f232d2e

13 files changed

Lines changed: 14269 additions & 7568 deletions

File tree

.github/workflows/check-dist.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# `dist/index.js` is a special file in Actions.
2+
# When you reference an action with `uses:` in a workflow,
3+
# `index.js` is the code that will run.
4+
# For our project, we generate this file through a build process from other source files.
5+
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
6+
name: Check dist/
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
paths-ignore:
14+
- '**.md'
15+
pull_request:
16+
paths-ignore:
17+
- '**.md'
18+
workflow_dispatch:
19+
20+
jobs:
21+
check-dist:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Set Node.js 16.x
28+
uses: actions/setup-node@v2.4.1
29+
with:
30+
node-version: 16.x
31+
32+
- name: Validate package-lock
33+
run: npx lockfile-lint --path package-lock.json --allowed-hosts npm yarn --validate-https
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Rebuild the dist/ directory
39+
run: npm run build
40+
41+
- name: Compare the expected and actual dist/ directories
42+
run: |
43+
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
44+
echo "Detected uncommitted changes after build. See status below:"
45+
git diff
46+
exit 1
47+
fi
48+
id: diff
49+
50+
# If index.js was different than expected, upload the expected version as an artifact
51+
- uses: actions/upload-artifact@v2
52+
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
53+
with:
54+
name: dist
55+
path: dist/

RELEASING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Release
22

33
* starting on `master`
4+
* `npm install`
45
* `npm run all`
56
* `git checkout releases/v1`
67
* `git merge master`

__tests__/checksums.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import * as checksums from '../src/checksums'
22
import nock from 'nock'
3+
import {afterEach, describe, expect, test, jest} from '@jest/globals'
4+
5+
jest.setTimeout(30000)
36

47
test('fetches wrapper jars checksums', async () => {
58
const validChecksums = await checksums.fetchValidChecksums(false)

__tests__/find.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as path from 'path'
22
import * as find from '../src/find'
3+
import {expect, test} from '@jest/globals'
34

45
test('finds test data wrapper jars', async () => {
56
const repoRoot = path.resolve('.')

__tests__/hash.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as path from 'path'
22
import * as hash from '../src/hash'
3+
import {expect, test} from '@jest/globals'
34

45
test('can sha256 files', async () => {
56
const sha = await hash.sha256File(

__tests__/validate.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import * as path from 'path'
22
import * as validate from '../src/validate'
3+
import {expect, test, jest} from '@jest/globals'
4+
5+
jest.setTimeout(30000)
36

47
const baseDir = path.resolve('.')
58

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
default: ''
1818

1919
runs:
20-
using: 'node12'
20+
using: 'node16'
2121
main: 'dist/index.js'
2222

2323
branding:

0 commit comments

Comments
 (0)