mirror of
https://github.com/steelcityamir/safe-content-ai.git
synced 2024-09-11 18:37:31 +03:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Python CI
|
|
|
|
on: [push]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
cache: 'pip' # caching pip dependencies
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install -r test-requirements.txt
|
|
pip install pylint
|
|
- name: Analysing the code with pylint
|
|
run: |
|
|
pylint $(git ls-files '*.py')
|
|
- name: Run tests and collect coverage
|
|
run: pytest --cov
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v4.0.1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
slug: steelcityamir/safe-content-ai |