Expand iterable input types in magic_filter methods #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: { } | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get pip cache dir | |
id: pip-cache | |
run: | | |
echo "::set-output name=dir::$(pip cache dir)" | |
- name: pip cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-py-${{ matrix.python-version }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install -e .[dev] | |
- name: Lint code | |
run: | | |
flake8 magic_filter | |
isort --check-only -df magic_filter | |
black --check --diff magic_filter | |
mypy magic_filter | |
- name: Run tests | |
run: | | |
pytest --cov=magic_filter --cov-config .coveragerc --cov-report=xml | |
- uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
flags: unittests | |
name: py-${{ matrix.python-version }}-${{ matrix.os }} | |
fail_ci_if_error: true | |
build: | |
name: Build | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install build dependencies | |
run: python -m pip install --upgrade build | |
- name: Build | |
run: python -m build . | |
- name: Try install wheel | |
run: | | |
mkdir -p try_install | |
cd try_install | |
python -m venv venv | |
venv/bin/pip install ../dist/magic_filter-*.whl | |
venv/bin/python -c "import magic_filter; print(magic_filter.__version__)" | |
- name: Publish artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: package | |
path: dist/* |