Skip to content

Commit

Permalink
chore: update dependencies (including circle -> gha) (#47)
Browse files Browse the repository at this point in the history
Test run:
https://github.com/dequelabs/dbjorge-test-repo/actions/runs/9604481533/job/26490058201

Notes on the updates:
- I blew away the whole lockfile and updated everything listed in
package.json to latest
- ...except eslint, which I left at major version 8 for compat with
typescript-eslint's current stable version
- ...and except a few dev deps that I dropped because we weren't using
them anyway (eslint+tslint stuff, sinon)
- The octokit update bumps octokit to a version that uses native fetch,
which nock can't mock, so I added a test seam that forces octokit to use
node-fetch when `NODE_ENV === 'test'`. The alternatives would be to use
a beta version of nock (didn't want to use a beta version of anything in
a repo we update so rarely) or to use a different mocking library
(`fetch-mock` was the best-looking option but it required more test
changes than I wanted to spend time on to swap it out)

I included a conversion from circle to GHA because I hit errors when
naively updating the circle config to node 20 and it was faster to
convert than to debug circle. None of the failed checks are relevant
anymore; once this merges we can disable circle in this repo and update
the branch policies to refer to GHA.

## Reviewer checks

**Required fields, to be filled out by PR reviewer(s)**

- [ ] Follows the commit message policy, appropriate for next version
- [ ] Code is reviewed for security
  • Loading branch information
dbjorge authored Jun 21, 2024
1 parent 5395589 commit 0453a2a
Show file tree
Hide file tree
Showing 9 changed files with 5,327 additions and 5,320 deletions.
51 changes: 0 additions & 51 deletions .circleci/config.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/tag-major-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ jobs:
update_tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on: push

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build

lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint

test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run test
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:12-alpine
FROM node:20-alpine

WORKDIR /app
COPY . /app

RUN npm install
RUN npm ci
RUN npm run build
ENTRYPOINT ["node", "/app/lib/main.js"]
Loading

0 comments on commit 0453a2a

Please sign in to comment.