Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade CI Node.js version #163

Merged
merged 7 commits into from Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
@@ -1,27 +1,32 @@
name: build

on: [pull_request, push]
on:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: npm install, build, and test
run: |
yarn --frozen-lockfile
yarn build
yarn lint
yarn test:ci
npm ci
npm run build
npm run lint
npm run test:ci
env:
CI: true
# - uses: codecov/codecov-action@v1
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
@@ -1,27 +1,31 @@
name: publish

on: push
on:
push:
tags:
- "*"

jobs:
publish:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: npm publish
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc
npm whoami
yarn --frozen-lockfile
yarn build
npm ci
npm run build
npm publish
if: contains(github.ref, 'tags/v')
env:
Expand Down
14 changes: 14 additions & 0 deletions jest.config.mjs
@@ -0,0 +1,14 @@
export default {
transform: {
"^.+\\.ts$": [
"ts-jest",
{
diagnostics: false,
},
],
},
testRegex: "(src/.*\\.test)\\.ts$",
testPathIgnorePatterns: ["/node_modules/", "\\.d\\.ts$", "lib/.*"],
collectCoverageFrom: ["src/**/*.ts", "!**/testing/**"],
moduleFileExtensions: ["js", "ts", "json"],
};