Skip to content

Normalised repository.url in package.json to git+https://github.com/r… #64

Normalised repository.url in package.json to git+https://github.com/r…

Normalised repository.url in package.json to git+https://github.com/r… #64

name: Check and test code
on:
pull_request:
push:
branches-ignore:
- release-*
jobs:
lint:
runs-on: ubuntu-latest
container:
image: response200/node-build:latest
options: --user root:root
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-dependencies-${{ hashFiles('**/package-lock.json') }}
- run: npm ci --cache ~/.npm --prefer-offline --ignore-scripts --no-fund
# Fix `fatal: detected dubious ownership in repository at '/__w/eslint-config/eslint-config'`
# error that occurs during this step. Since version 2.35.2 `git` has not
# liked that the git directory is owned by other user than the one
# performing git operations in the directory. Change the owner of the
# directory to be the same user as these steps are run as.
- run: chown root:root "$GITHUB_WORKSPACE"
- run: scripts/lint.sh paths .
test:
runs-on: ubuntu-latest
container:
image: response200/node-build:latest
options: --user root:root
needs: lint # Run after lint so that lint job has an opportunity to fill npm cache.
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-dependencies-${{ hashFiles('**/package-lock.json') }}
- run: npm ci --cache ~/.npm --prefer-offline --ignore-scripts --no-fund
- run: chown root:root "$GITHUB_WORKSPACE"
- run: scripts/test.sh
type-check:
runs-on: ubuntu-latest
container:
image: response200/node-build:latest
options: --user root:root
needs: lint # Run after lint so that lint job has an opportunity to fill npm cache.
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-dependencies-${{ hashFiles('**/package-lock.json') }}
- run: npm ci --cache ~/.npm --prefer-offline --ignore-scripts --no-fund
- run: chown root:root "$GITHUB_WORKSPACE"
- run: scripts/type-check.sh