Skip to content

Merge pull request #107 from GlobalFishingWatch/feature/PIPELINE-2170 #25

Merge pull request #107 from GlobalFishingWatch/feature/PIPELINE-2170

Merge pull request #107 from GlobalFishingWatch/feature/PIPELINE-2170 #25

Workflow file for this run

name: main
on:
push:
branches: [master, develop]
pull_request:
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install flake8
run: pip --disable-pip-version-check install flake8
- name: Lint with flake8
run: flake8 --count
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
# cache option make the step fail if you don´t have requirements.txt or pyproject.toml on root.
# https://github.com/actions/setup-python/issues/807.
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Test with pytest
run: |
pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}