Skip to content

Commit

Permalink
Merge pull request #260 from ThomasWaldmann/gha
Browse files Browse the repository at this point in the history
add a github actions CI workflow, fixes #255
  • Loading branch information
ThomasWaldmann authored Jan 5, 2021
2 parents e74fdc3 + b67aa9b commit db54490
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 db54490

Please sign in to comment.