Merge pull request #1 from Torgen/master #1
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
on: ["push", "pull_request"] | |
name: Test | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
COVERALLS_PARALLEL: true | |
TEST_BROWSER_DRIVER: playwright | |
strategy: | |
matrix: | |
browser: | |
- chromium | |
- firefox | |
test_script: | |
- coverage.lcov | |
- coverage.full.lcov | |
steps: | |
- uses: actions/checkout@master | |
with: | |
submodules: recursive | |
- name: Read Meteor version | |
run: sed -e "s/@/_VERSION=/" < .meteor/release >> "$GITHUB_ENV" | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@master | |
with: | |
node-version: 14.x | |
- uses: actions/cache@v3 | |
id: cache-meteor | |
with: | |
path: ~/.meteor | |
key: "${{ runner.os }}-meteor-install-\ | |
${{ hashFiles('.meteor/versions') }}" | |
- uses: meteorengineer/setup-meteor@v1 | |
if: steps.cache-meteor.outputs.cache-hit != 'true' | |
with: | |
meteor-release: ${{ env.METEOR_VERSION }} | |
- uses: actions/cache@v3 | |
id: cache-npm | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: npm install | |
run: ~/.meteor/meteor npm install | |
- name: Test ${{ matrix.test_script }} | |
run: ~/.meteor/meteor npm run-script ${{ matrix.test_script }} | |
env: | |
PLAYWRIGHT_BROWSER: ${{ matrix.browser }} | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: run-${{ matrix.test_script }}-${{ matrix.browser }} | |
path-to-lcov: .coverage/lcov.info | |
parallel: true | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true | |
- name: Rerun Coverage | |
run: "curl --location --request GET 'https://coveralls.io/rerun_build?\ | |
repo_token=${{ secrets.COVERALLS_REPO_TOKEN }}&\ | |
build_num=${{ github.run_id }}'" |