chore: force package release (#134) #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main-test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "docs/" | |
- "**.md" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Coverage - Calculation | |
runs-on: ubuntu-latest | |
steps: | |
# Cloning | |
- uses: actions/checkout@v3 | |
# Setup and Caching | |
- name: Use latest Node.js LTS version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
# NPM Cache using all package-lock files as hash | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
# Dependencies | |
- name: Core - Install Dependencies | |
run: npm ci | |
# Testing | |
- name: Core - Run Tests | |
# Generate lcov.info file | |
run: npm run test:coverage:ci | |
# Artifact | |
- name: Core - Upload Test Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-results | |
path: ${{ github.workspace }}/**/coverage/lcov.info | |
# Send coverage information to Coveralls | |
coverage: | |
name: Coverage(${{ matrix.package }}) - Collection | |
needs: test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "." | |
strategy: | |
# Keep running other versions when a job fails | |
fail-fast: false | |
matrix: | |
# Collect coverage for all packages and plugins | |
package: | |
- libraries/analysis-javascript | |
- libraries/ast-visitor-javascript | |
- libraries/instrumentation-javascript | |
- libraries/search-javascript | |
- tools/javascript | |
steps: | |
# Download test results | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage-results | |
# Run the Coveralls action which uploads the lcov.info file | |
- name: Coveralls(${{ matrix.package }}) | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
# We collect all coverages in parallel | |
parallel: true | |
flag-name: ${{ matrix.package }} | |
path-to-lcov: ${{ github.workspace }}/${{ matrix.package }}/coverage/lcov.info | |
# Indicate sending coverage to Coveralls is finished | |
coverage-finished: | |
name: Coverage - Finish | |
needs: coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |