enable github actions

This commit is contained in:
Anthony Sottile 2021-04-03 14:17:55 -07:00
parent e0116d8e77
commit 0fa32894fd
6 changed files with 60 additions and 109 deletions

View file

@ -1,8 +0,0 @@
# To activate, change the Appveyor settings to use `.appveyor.yml`.
install:
- C:\Python38-x64\python.exe -m pip install --upgrade setuptools tox virtualenv
build: off
test_script:
- C:\Python38-x64\python.exe -m tox -e py36,py37,dogfood

51
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,51 @@
name: main
on:
push:
branches: [master]
tags:
pull_request:
jobs:
main:
strategy:
matrix:
include:
# linux
- os: ubuntu-latest
python: pypy-3.7
toxenv: py
- os: ubuntu-latest
python: 3.6
toxenv: py
- os: ubuntu-latest
python: 3.7
toxenv: py
- os: ubuntu-latest
python: 3.8
toxenv: py
- os: ubuntu-latest
python: 3.9
toxenv: py
# windows
- os: windows-latest
python: 3.6
toxenv: py
# misc
- os: ubuntu-latest
python: 3.9
toxenv: docs
- os: ubuntu-latest
python: 3.9
toxenv: linters
- os: ubuntu-latest
python: 3.9
toxenv: dogfood
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: pip install --upgrade setuptools pip tox virtualenv
- run: tox -e ${{ matrix.toxenv }}

View file

@ -1,70 +0,0 @@
image: python
stages:
- test
- build
- release
before_script:
- pip install pip --upgrade
- pip install -r dev-requirements.txt
after_script:
- pip install codecov
- codecov --token=7d117e6b-aab6-4283-ab19-166dafc38cf5
pypy3:
image: pypy:3.6-7.2.0
stage: test
script: tox -e pypy3
python36:
image: python:3.6
stage: test
script: tox -e py36
python37:
image: python:3.7
stage: test
script: tox -e py37
python38:
image: python:3.8
stage: test
script: tox -e py38
linters:
image: python:3.7
stage: test
script: tox -e linters
pre-commit:
image: python:3.7
stage: test
script: tox -e pre-commit
docs:
stage: test
script: tox -e docs
dogfood:
image: python:3.7
stage: test
script: tox -e dogfood
build:
stage: build
script: tox -e build
artifacts:
paths:
- dist/
expire_in: 1 month
release:
stage: release
script: tox -e build
artifacts:
paths:
- dist
only:
- tags

View file

@ -3,6 +3,7 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: debug-statements
exclude: ^tests/fixtures/example-code/invalid-syntax.py$
- id: end-of-file-fixer

View file

@ -1,31 +0,0 @@
language: python
cache: pip
before_script:
- pip install --upgrade tox setuptools virtualenv
# test script
script: tox
notifications:
on_success: change
on_failure: always
matrix:
include:
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.8
env: TOXENV=py38
- python: 3.7
env: TOXENV=readme
- python: 3.7
env: TOXENV=flake8
- python: 3.7
env: TOXENV=pylint
- python: 3.7
env: TOXENV=doc8
- python: 3.7
env: TOXENV=bandit
- python: 3.7
env: TOXENV=docs

View file

@ -1,3 +1,11 @@
.. image:: https://github.com/PyCQA/flake8/workflows/main/badge.svg
:target: https://github.com/PyCQA/flake8/actions?query=workflow%3Amain
:alt: build status
.. image:: https://results.pre-commit.ci/badge/github/PyCQA/flake8/master.svg
:target: https://results.pre-commit.ci/latest/github/PyCQA/flake8/master
:alt: pre-commit.ci status
========
Flake8
========