Migration/3.0 #37
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
# the test suite runs the tests (headless, server+client) for multiple Meteor releases | |
name: Test suite | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
name: Javascript standard lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-20-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-20- | |
- run: | | |
npm ci | |
npm run lint | |
test: | |
name: Meteor package tests | |
# needs: [lint] | |
runs-on: ubuntu-latest | |
# allow usage of CODACY / CODECOV tokens | |
environment: coverage | |
strategy: | |
matrix: | |
meteorRelease: | |
- '3.0.1' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Setup meteor ${{ matrix.meteorRelease }} | |
uses: meteorengineer/setup-meteor@v1 | |
with: | |
meteor-release: ${{ matrix.meteorRelease }} | |
- name: Install test dependencies | |
run: | | |
meteor --version | |
meteor npm -v | |
npm -v | |
meteor npm config set legacy-peer-deps true | |
meteor npm cache clean --force | |
npm install -g coveralls codecov.io codacy-coverage | |
npm ci | |
- name: Run tests | |
run: | | |
npm run test | |
sed 's/packages\/meteor-coverage\///' someapp/.coverage/lcov.info | codacy-coverage || true # ignore codacy error | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
- name: Codecov | |
uses: codecov/codecov-action@v4.5.0 | |
with: | |
# Repository Codecov token. Used to authorize report uploads | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: someapp/.coverage/lcov.info |