Skip to content

feat: Add GitHub Actions CI/CD #1

feat: Add GitHub Actions CI/CD

feat: Add GitHub Actions CI/CD #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Run tests
run: |
pytest tests/ --cov=sentinelowl --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Run linter
run: |
flake8 sentinelowl/ tests/
- name: Format code
run: |
black --check sentinelowl/ tests/