2023-06-06 23:38:39 -07:00
|
|
|
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
|
|
|
|
|
|
name: Python package
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-06-10 08:41:31 -07:00
|
|
|
python-version: ["3.9", "3.10", "3.11"]
|
2023-06-06 23:38:39 -07:00
|
|
|
|
|
|
|
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: |
|
2023-08-16 13:39:55 -07:00
|
|
|
sudo apt install gettext
|
2023-06-06 23:38:39 -07:00
|
|
|
python -m pip install --upgrade pip
|
2023-08-16 11:56:03 -07:00
|
|
|
python -m pip install poetry pytest
|
2023-06-07 00:06:12 -07:00
|
|
|
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
|
|
poetry install
|
|
|
|
pip install -e .
|
2023-08-16 13:29:14 -07:00
|
|
|
- name: build
|
|
|
|
run: |
|
|
|
|
python build.py
|
2023-08-13 08:57:54 -07:00
|
|
|
- name: Lint with ruff
|
|
|
|
uses: chartboost/ruff-action@v1
|
|
|
|
with:
|
|
|
|
src: "./biliarchiver"
|
|
|
|
- name: Run biliarchiver tools
|
2023-06-06 23:38:39 -07:00
|
|
|
run: |
|
2023-08-10 10:51:42 -07:00
|
|
|
python -m biliarchiver.cli_tools.biliarchiver --help
|
|
|
|
python -m biliarchiver.cli_tools.biliarchiver init
|
|
|
|
python -m biliarchiver.cli_tools.biliarchiver down --help
|
|
|
|
python -m biliarchiver.cli_tools.biliarchiver get --help
|
|
|
|
python -m biliarchiver.cli_tools.biliarchiver up --help
|
2023-06-06 23:38:39 -07:00
|
|
|
# - name: Test with pytest
|
|
|
|
# run: |
|
2023-06-10 08:41:31 -07:00
|
|
|
# pytest
|