1
0
Fork 0
mirror of synced 2024-06-02 18:34:37 +12:00
bulk-downloader-for-reddit/.github/workflows/test.yml

66 lines
1.5 KiB
YAML
Raw Normal View History

name: Python Test
on:
push:
2021-05-04 01:23:09 +12:00
branches: [ master, development ]
paths-ignore:
- "**.md"
- ".markdown_style.rb"
- ".mdlrc"
- "scripts/"
pull_request:
2021-05-04 01:23:09 +12:00
branches: [ master, development ]
paths-ignore:
- "**.md"
- ".markdown_style.rb"
- ".mdlrc"
- "scripts/"
jobs:
test:
runs-on: ${{ matrix.os }}
2021-04-20 08:50:08 +12:00
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9]
ext: [.sh]
include:
- os: windows-latest
python-version: 3.9
ext: .ps1
steps:
- uses: actions/checkout@v3
2021-04-20 08:50:08 +12:00
- name: Setup Python
uses: actions/setup-python@v4
with:
2021-04-20 08:50:08 +12:00
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pytest pytest-cov ruff
pip install .
2021-04-20 08:50:08 +12:00
- name: Make configuration for tests
env:
REDDIT_TOKEN: ${{ secrets.REDDIT_TEST_TOKEN }}
run: |
./devscripts/configure${{ matrix.ext }}
2021-04-20 08:50:08 +12:00
- name: Critical ruff lint
run: |
2024-01-16 03:15:15 +13:00
ruff check --select=E9,F63,F7,F82 .
2021-04-20 08:50:08 +12:00
- name: Test with pytest
run: |
pytest -m "not slow" --verbose --cov=./bdfr/ --cov-report term:skip-covered --cov-report html
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage_report
path: htmlcov/
- name: Full ruff lint
run: |
2024-01-16 03:15:15 +13:00
ruff check . --exit-zero