Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

name: CI
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Configure Git
run: |
git config --global url."https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.inesctec.pt/".insteadOf "https://gitlab.inesctec.pt/"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install flake8
- name: Lint code
run: |
flake8
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Configure Git
run: |
git config --global url."https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.inesctec.pt/".insteadOf "https://gitlab.inesctec.pt/"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Run tests with coverage
run: |
cd src/market
pytest --cov