Skip to content

2.3.0

2.3.0 #346

Workflow file for this run

# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- '12'
- '14'
- '16'
# - 'lts/*'
steps:
- name: Checkout commit
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: 📦 Install dependencies
run: yarn install --immutable
- name: 🔨 Build Project
run: yarn build
- name: ✅ Run Tests
run: yarn test-with-coverage
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info
changeset:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'main' }}
steps:
- name: Checkout commit
uses: actions/checkout@v2
with:
# NOTE: This is important to compare commits to check existence of new changeset
fetch-depth: 0
- name: Use Node.js 12
uses: actions/setup-node@v2
with:
node-version: 12
cache: 'yarn'
- name: 📦 Install dependencies
run: yarn install --immutable
- name: 📝 Check if changeset added in PR
run: |
# Checkout PR head commit instead of merge commit
# See: https://github.com/atlassian/changesets/issues/517#issuecomment-813282523
git checkout ${{ github.event.pull_request.head.sha }}
yarn changeset status --since=origin/main