Skip to content

updated actions CI workflow with poetry integration #6

updated actions CI workflow with poetry integration

updated actions CI workflow with poetry integration #6

Workflow file for this run

name: CI
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["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: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with test
- name: Lint code
run: |
flake8
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["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: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with test
cd src/market
pytest --cov