Bump codecov/codecov-action from 3 to 5 #260
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: CI | |
on: [push, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache python modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
yarn --dev | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements-dev.txt | |
- name: Lint | |
run: | | |
yarn run lint | |
flake8 | |
- name: Package | |
run: | | |
python setup.py bdist_wheel | |
pip install --no-cache-dir dist/legunto-*.whl | |
- name: Unit test | |
run: pytest --cov-report=xml --cov=./ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 |