Skip to content

Commit

Permalink
Merge pull request #1099 from jettero/gh-ci
Browse files Browse the repository at this point in the history
we retired the open source jenkins
  • Loading branch information
jettero authored Jun 14, 2021
2 parents 71c4297 + 25d520d commit 59bc194
Show file tree
Hide file tree
Showing 6 changed files with 1,271 additions and 1,007 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: pre-commit

on: [ pull_request ]

jobs:
'pre-commit':
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# note: we use depth:0 so we can use

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit run --files .pre-commit-config.yaml
- name: analyze code with pre-commit
run: 'pre-commit run --from-ref "origin/${{ github.base_ref }}" --to-ref HEAD'
32 changes: 32 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: pytest

on: [ pull_request ]

defaults:
run:
shell: bash

jobs:
pytest:
runs-on: ubuntu-latest
container: jettero/kersplat:1.0.21
steps:

- uses: actions/checkout@v2

- name: install dependencies
run: |
source /etc/profile.d/kersplat.sh
which python
which pip
python --version
pip --version
python -m pip install --upgrade pip
python -m pip install --upgrade pytest
bash mk-requires.sh
python -m pip install -r requirements.txt
- name: run pytest
run: |
source /etc/profile.d/kersplat.sh
python -m pytest tests
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repos:
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-merge-conflict
- id: check-ast
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
Expand All @@ -17,3 +18,6 @@ repos:
rev: 'v2.6.0'
hooks:
- id: pylint
- id: pylint
name: no-bad-escapes
entry: python -m pylint --confidence='' -d all -e anomalous-backslash-in-string,anomalous-unicode-escape-in-string
Loading

0 comments on commit 59bc194

Please sign in to comment.