Merge pull request #30 from TankerHQ/jul/npm-migration #176
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: Tests | |
on: [push] | |
jobs: | |
node: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- macos-11 | |
- windows-2019 | |
node_version: | |
- "18" | |
- "20" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Install packages | |
run: npm install | |
- name: Tests on ${{ matrix.os }} with Node ${{ matrix.node_version }} | |
run: npm run test | |
coverage: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install packages | |
run: npm install | |
- name: Run eslint | |
run: npm run lint:js | |
- name: Run lint:ts | |
run: npm run lint:ts | |
- name: Run coverage | |
run: npm run coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.11" | |
- name: Install and configure poetry | |
run: | | |
python -m pip install poetry | |
python -m poetry config virtualenvs.create false | |
- name: Install python packages | |
run: python -m poetry install | |
- name: Run python linters | |
run: | | |
python -m poetry run black --check run-ci.py | |
python -m poetry run flake8 run-ci.py | |
python -m poetry run isort --check --profile black run-ci.py | |
python -m poetry run mypy run-ci.py |