Skip to content

Create test.yaml

Create test.yaml #3

Workflow file for this run

name: Python CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-and-lint:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
# Install dependencies
- name: Install dependencies
working-directory: assignments
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
# Run pytest
- name: Run pytest
working-directory: assignments/life_expectancy
run: |
pytest
# Run pylint
- name: Run pylint
working-directory: assignments/life_expectancy
run: |
pylint $(find . -type f -name "*.py")