Skip to content

Commit

Permalink
Merge pull request #200 from check-run-reporter/modernize
Browse files Browse the repository at this point in the history
modernize
  • Loading branch information
ianwremmel authored Mar 8, 2023
2 parents df084c8 + fbe3de3 commit f335a5b
Show file tree
Hide file tree
Showing 8 changed files with 558 additions and 793 deletions.
3 changes: 1 addition & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ updates:
directory: "/"
ignore:
- dependency-name: "@types/node"
versions:
- "> 14"
update-types: ['version-update:semver-major']
schedule:
interval: "daily"
versioning-strategy: "increase"
9 changes: 4 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- run: npm i -g npm@7
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v2
Expand All @@ -53,7 +52,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -91,7 +90,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -157,7 +156,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- run: npm i -g npm@7
- run: npm ci
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
> Check Run Reporter's client library, CLI, and CI integrations.
This is a monorepo (sort of) for Check Run Reporter's client library, CLI, and
CI integrations. Instead of mainting separate test suites (if any tests at all)
for each plugin, this repo contains the core TypeScript code as well as CI
CI integrations. Instead of maintaining separate test suites (if any tests at
all) for each plugin, this repo contains the core TypeScript code as well as CI
plugin integration code. As part of the build and release process, each plugin
is pushed to the appopropriate repository for consumption.
is pushed to the appropriate repository for consumption.

<!-- toc -->

Expand All @@ -27,15 +27,15 @@ For the various CI integrations, check the READMEs in their
[respective repos](https://github.com/check-run-reporter).

For the CLI, download the
[latest releast](https://github.com/check-run-reporter/integrations/releases).
[latest releas](https://github.com/check-run-reporter/integrations/releases).
Binaries are available for Linux, macOS, and Windows.

## Usage

For the various CI integrations, check the READMEs in their
[respective repos](https://github.com/check-run-reporter).

For the CLI, get the most up to date documentation by running `crr --help`.
For the CLI, get the most up-to-date documentation by running `crr --help`.

### Examples

Expand Down Expand Up @@ -63,8 +63,8 @@ crr submit \
If you're on the Persistent plan, you can use Check Run Reporter to efficiently
distribute your tests across multiple test runners.

`crr split` prints the names of all of the test files that should be run by this
node. Specify the `--nodeCount` and `--nodeIndex` options to to tell Check Run
`crr split` prints the names of all the test files that should be run by this
node. Specify the `--nodeCount` and `--nodeIndex` options to tell Check Run
Reporter how many nodes there are and which node this is. Use the `--tests`
option to identify all candidate test files. Any tests that Check Run Reporter
has seen before will be evenly distributed while new test will be spread
Expand All @@ -86,8 +86,8 @@ npx jest $(crr split \
## Contributing

We welcome pull requests, but for anything more than a minor tweak, please
create an issue for so we can discuss whether the change is the right direction
for the project.
create an issue so we can discuss whether the change is the right direction for
the project.

## License

Expand Down
2 changes: 1 addition & 1 deletion integrations/action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ outputs:
tests:
description: The names of the test files to test on this node
runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'
10 changes: 5 additions & 5 deletions integrations/action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
},
"homepage": "https://www.check-run-reporter.com",
"dependencies": {
"@actions/core": "^1.5.0",
"@actions/github": "^5.0.0",
"@actions/glob": "^0.2.0",
"@octokit/webhooks-types": "^4.17.1",
"axios": "^0.24.0"
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@actions/glob": "^0.4.0",
"@octokit/webhooks-types": "^6.10.0",
"axios": "^1.3.4"
}
}
6 changes: 3 additions & 3 deletions integrations/action/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as glob from '@actions/glob';
// it's type-only
// eslint-disable-next-line import/no-unresolved
import type {PullRequestEvent} from '@octokit/webhooks-types';
import axios from 'axios';
import {isAxiosError} from 'axios';

// this is a little weird: we're loading by path instead of by package because
// we need main to point at src during dev but dist during release.
Expand Down Expand Up @@ -130,7 +130,7 @@ async function doSplit({label, tests, token}: DoSplitInput, {client}: Context) {

core.setOutput('tests', filenames.join(' '));
} catch (err) {
if (axios.isAxiosError(err)) {
if (isAxiosError(err)) {
console.error(`Check Run Reporter return a ${err.response?.status}`);
if (err.response?.data?.message?.details?.[0]?.message) {
console.error(err.response.data.message.details[0].message);
Expand Down Expand Up @@ -193,7 +193,7 @@ async function main() {

if (require.main === module) {
main().catch((err) => {
if (axios.isAxiosError(err)) {
if (isAxiosError(err)) {
core.setFailed(err);

core.error(`Check Run Reporter returned a ${err.response?.status}`);
Expand Down
Loading

0 comments on commit f335a5b

Please sign in to comment.