Skip to content

Commit 81bf47d

Browse files
committed
Update eactions
1 parent 9434288 commit 81bf47d

14 files changed

Lines changed: 71 additions & 78 deletions

File tree

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
default: "npm"
88
required: false
99
build_path:
10-
description: "The path to the build script."
10+
description: "The path to the build."
1111
default: "dist/"
1212
required: false
1313

.github/actions/bun-environment-setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ runs:
4040
if: steps.restore-dependencies-cache.outputs.cache-hit != 'true'
4141
with:
4242
path: node_modules
43-
key: dependencies-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lockb') }}
43+
key: dependencies-${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/bun.lockb') }}
Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
name: "ESLint Runner"
22
description: "Runs ESLint on the codebase"
33

4-
# TODO: Eslint report fix
5-
64
inputs:
75
package_manager:
86
description: 'The package manager to use for running scripts. Options are "npm" or "bun".'
97
default: "npm"
108
required: false
11-
GITHUB_TOKEN:
12-
description: "The GitHub token to use for annotating code linting results."
13-
required: true
9+
github_token:
10+
description: "The GitHub token to use for reporting lint results."
11+
required: false
1412

1513
runs:
1614
using: "composite"
1715
steps:
18-
- name: Run tests (bun)
16+
- name: Run ESLint (bun)
1917
if: inputs.package_manager == 'bun'
2018
shell: bash
21-
run: bunx eslint . --cache --output-file eslint_report.json --format json
19+
run: bunx eslint . --cache --cache-location .eslintcache --output-file eslint_report.json --format json
2220

23-
- name: Run tests (npm)
21+
- name: Run ESLint (npm)
2422
if: inputs.package_manager == 'npm'
2523
shell: bash
26-
run: npx eslint . --cache --output-file eslint_report.json --format json
24+
run: npx eslint . --cache --cache-location .eslintcache --output-file eslint_report.json --format json
25+
26+
- name: Transform ESLint Report
27+
if: always()
28+
uses: MeilCli/common-lint-reporter/transformer/eslint@v1
29+
with:
30+
report_files: "eslint_report.json"
31+
github_token: ${{ inputs.github_token }}
2732

28-
- name: Annotate Code Linting Results
33+
- name: Report Lint Results
2934
if: always()
30-
continue-on-error: true
31-
uses: ataylorme/eslint-annotate-action@v3
35+
uses: MeilCli/common-lint-reporter@v1
3236
with:
33-
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
34-
report-json: "eslint_report.json"
37+
report_type: "check_run"
38+
report_to_same_check_run: "true"
39+
github_token: ${{ inputs.github_token }}
Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
11
name: "Jest Test Runner"
22
description: "Runs Jest tests, with coverage reporting"
33

4-
# TODO: Add junit reporting
54
inputs:
65
package_manager:
76
description: 'The package manager to use for running scripts. Options are "npm" or "bun".'
87
default: "npm"
98
required: false
9+
github_token:
10+
description: "The GitHub token to use for reporting test results."
11+
required: false
1012

1113
runs:
1214
using: "composite"
1315
steps:
1416
- name: Run tests (bun)
1517
if: inputs.package_manager == 'bun'
1618
shell: bash
17-
run: bunx jest --ci --coverage
19+
run: bunx jest --ci --coverage --reporters=default --reporters=jest-junit --reporters=json-summary
1820

1921
- name: Run tests (npm)
2022
if: inputs.package_manager == 'npm'
2123
shell: bash
22-
run: npx jest --ci --coverage
24+
run: npx jest --ci --coverage --reporters=default --reporters=jest-junit --reporters=json-summary
25+
26+
- name: Transform JUnit Report
27+
if: always()
28+
uses: MeilCli/common-lint-reporter/transformer/junit@v1
29+
with:
30+
report_files: "junit.xml"
31+
github_token: ${{ inputs.github_token }}
32+
33+
- name: Report Test Results
34+
if: always()
35+
uses: MeilCli/common-lint-reporter@v1
36+
with:
37+
report_type: "check_run"
38+
report_to_same_check_run: "true"
39+
github_token: ${{ inputs.github_token }}

.github/actions/npm-environment-setup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ runs:
2929
id: restore-dependencies-cache
3030
with:
3131
path: node_modules
32-
key: dependencies-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lockb') }}-2
32+
key: dependencies- ${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/bun.lockb') }}
3333

3434
- name: Install npm dependencies
3535
if: steps.restore-dependencies-cache.outputs.cache-hit != 'true'
@@ -40,4 +40,4 @@ runs:
4040
if: steps.restore-dependencies-cache.outputs.cache-hit != 'true'
4141
with:
4242
path: node_modules
43-
key: dependencies-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lockb') }}-2
43+
key: dependencies-${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/bun.lockb') }}

.github/actions/restore-build-cache/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Restore build cache
33

44
inputs:
55
build_path:
6-
description: "The path to the build script."
6+
description: "The path to the build."
77
default: "dist/"
88
required: false
99

.github/actions/restore-dependency-cache/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ runs:
88
uses: actions/cache/restore@v4
99
with:
1010
path: node_modules
11-
key: dependencies-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lockb') }}-2
11+
key: dependencies-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lockb') }}

.github/actions/upload-to-cloudflare-pages/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ inputs:
1515
description: "Local path to the dist folder to upload."
1616
required: false
1717
default: "dist"
18+
# TODO: rework this to support envs and not "branches" so aliases can be used
1819
ref:
1920
description: "The name of the branch to deploy."
2021
required: true

.github/actions/upload-to-s3/action.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
11
name: "Vitest Test Runner"
22
description: "Runs Vitest tests, with coverage reporting"
33

4-
# TODO: Add junit reporting
54
inputs:
65
package_manager:
76
description: 'The package manager to use for running scripts. Options are "npm" or "bun".'
87
default: "npm"
98
required: false
9+
github_token:
10+
description: "The GitHub token to use for reporting test results."
11+
required: false
1012

1113
runs:
1214
using: "composite"
1315
steps:
1416
- name: Run tests (bun)
1517
if: inputs.package_manager == 'bun'
1618
shell: bash
17-
run: bunx vitest run --coverage
19+
run: bunx vitest run --coverage --reporter=junit --reporter=default --outputFile=junit.xml
1820

1921
- name: Run tests (npm)
2022
if: inputs.package_manager == 'npm'
2123
shell: bash
22-
run: npx vitest run --coverage
24+
run: npx vitest run --coverage --reporter=junit --reporter=default --outputFile=junit.xml
25+
26+
- name: Transform JUnit Report
27+
if: always()
28+
uses: MeilCli/common-lint-reporter/transformer/junit@v1
29+
with:
30+
report_files: "junit.xml"
31+
github_token: ${{ inputs.github_token }}
32+
33+
- name: Report Test Results
34+
if: always()
35+
uses: MeilCli/common-lint-reporter@v1
36+
with:
37+
report_type: "check_run"
38+
report_to_same_check_run: "true"
39+
github_token: ${{ inputs.github_token }}

0 commit comments

Comments
 (0)