Skip to content

Commit

Permalink
add a github actions CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWaldmann committed Jan 5, 2021
1 parent e74fdc3 commit b67aa9b
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# badge: https://github.com/bepasty/bepasty-server/workflows/CI/badge.svg?branch=master

name: CI

on:
push:
branches: [ master ]
paths:
- '**.py'
- '**.yml'
- '**.cfg'
- '**.ini'
- 'requirements.d/*'
- '!docs/**'
pull_request:
branches: [ master ]
paths:
- '**.py'
- '**.yml'
- '**.cfg'
- '**.ini'
- 'requirements.d/*'
- '!docs/**'

jobs:
lint:

runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Lint with flake8
run: |
pip install flake8
flake8 src scripts conftest.py
pytest:

needs: lint
env:
# Configure pkg-config to use OpenSSL from Homebrew
PKG_CONFIG_PATH: /usr/local/opt/[email protected]/lib/pkgconfig
TOXENV: ${{ matrix.toxenv }}

runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
with:
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.5
- name: Install Python requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.d/development.txt
- name: run pytest via tox
run: |
tox --skip-missing-interpreters
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
env:
OS: ${{ runner.os }}
python: ${{ matrix.python-version }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS, python

0 comments on commit b67aa9b

Please sign in to comment.