Skip to content

Merge pull request #1215 from spiltcoffee/dependabot/npm_and_yarn/lin… #2713

Merge pull request #1215 from spiltcoffee/dependabot/npm_and_yarn/lin…

Merge pull request #1215 from spiltcoffee/dependabot/npm_and_yarn/lin… #2713

name: Continuous Integration
on:
push:
branches: [main, beta]
pull_request:
branches: [main]
env:
HUSKY: 0
jobs:
sans-sourcemaps:
name: sans sourcemaps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# only need latest here as none of the steps below test the actual output
- name: setup node.js
uses: actions/[email protected]
with:
node-version: latest
cache: yarn
- run: yarn install --immutable
- run: yarn format
- run: yarn generate
- run: yarn compile
- run: yarn lint
- run: yarn docs
- name: check git is clean
run: 'git add . && git diff-index --quiet HEAD || (git reset --quiet && echo "Error: changed files" && git status --porcelain && exit 1)'
with-sourcemaps:
name: with sourcemaps (node ${{ matrix.node-version}})
needs: sans-sourcemaps
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
steps:
- uses: actions/checkout@v4
- name: setup node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --immutable
- run: yarn generate
- run: yarn compile:map
- run: yarn test
- name: check git is clean
run: 'git add . && git diff-index --quiet HEAD || (git reset --quiet && echo "Error: changed files" && git status --porcelain && exit 1)'
- name: upload test results
uses: actions/upload-artifact@v3
with:
name: test results
path: |
packages/postdfm/results/jest/report.xml
packages/@postdfm/ast/results/jest/report.xml
packages/@postdfm/ast2dfm/results/jest/report.xml
packages/@postdfm/dfm2ast/results/jest/report.xml
packages/@postdfm/plugin/results/jest/report.xml
packages/@postdfm/transform/results/jest/report.xml
- name: upload postdfm code coverage
uses: codecov/codecov-action@v3
with:
flags: postdfm
file: packages/postdfm/results/lcov/coverage.info
- name: upload @postdfm/ast code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/ast"
file: packages/@postdfm/ast/results/lcov/coverage.info
- name: upload @postdfm/ast2dfm code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/ast2dfm"
file: packages/@postdfm/ast2dfm/results/lcov/coverage.info
- name: upload @postdfm/dfm2ast code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/dfm2ast"
file: packages/@postdfm/dfm2ast/results/lcov/coverage.info
- name: upload @postdfm/plugin code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/plugin"
file: packages/@postdfm/plugin/results/lcov/coverage.info
- name: upload @postdfm/transform code coverage
uses: codecov/codecov-action@v3
with:
flags: "@postdfm/transform"
file: packages/@postdfm/transform/results/lcov/coverage.info