Skip to content

Working/upgrade without legacy peer deps #70

Working/upgrade without legacy peer deps

Working/upgrade without legacy peer deps #70

Workflow file for this run

# For all PRs, this workflow will
# - Install deps
# - Lint
# - Typecheck
# - Test
name: CI
on:
# will run on all PRs that are opened or updated (synchronized)
pull_request:
types: [opened, synchronize, reopened]
jobs:
# changelog must be edited for every PR
changelog:
name: Updates Changelog
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: "CHANGELOG.md"
skipLabels: "no-changelog"
lint:
name: Lint
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v4
- id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Use Node Version from nvmrc
uses: actions/setup-node@v4
with: { node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" }
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install
- name: Lint
run: npm run lint
typecheck:
name: Typecheck
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v4
- id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Use Node Version from nvmrc
uses: actions/setup-node@v4
with: { node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" }
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install
- name: Typecheck
run: node_modules/typescript/bin/tsc --noEmit
test:
name: Test & Coverage
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v4
- id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Use Node Version from nvmrc
uses: actions/setup-node@v4
with: { node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" }
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install
- name: Test
run: npm run test:ci -- --coverage
- name: Coveralls Report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}