Skip to content

Update if check on auto-merge dependabot #365

Update if check on auto-merge dependabot

Update if check on auto-merge dependabot #365

Workflow file for this run

name: Test & Deploy fake-useragent
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest # [macos-latest, windows-latest]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.9"]
name: Python ${{ matrix.python-version }} Test
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
check-latest: true
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests + lint check
run: tox
- name: Upload code coverage (HTML)
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: htmlcov/
build_and_deploy:
needs: test
runs-on: ubuntu-latest
name: Build & deploy to PyPi
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}