-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sclorg/add_ga
Initial GA, precommits, tox
- Loading branch information
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: pre-commit-tests@Auto-merger | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
sanity: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Get sha | ||
id: sha | ||
run: | | ||
echo "::set-output name=SHA::$(git rev-parse HEAD)" | ||
- name: Install needed dependences for sanity checks | ||
id: sched_test | ||
run: | | ||
sudo apt-get update && sudo apt-get -y install curl jq make git shellcheck python3 python3-pip | ||
pip3 install pre-commit | ||
- name: Run Sanity pre-commit tests | ||
continue-on-error: true | ||
id: pre_commit_tests | ||
run: | | ||
set +e | ||
pre-commit run --all | ||
echo ::set-output name=exit_status::$? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
name: Run Tox tests on auto-merger | ||
|
||
jobs: | ||
tox_test: | ||
name: Tox test | ||
strategy: | ||
matrix: | ||
tox_env: [py36, py37, py38, py39, py310, py311, py312] | ||
# Use GitHub's Linux Docker host | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run Tox tests on auto-merger | ||
id: test | ||
uses: fedora-python/tox-github-action@main | ||
with: | ||
tox_env: ${{ matrix.tox_env }} | ||
dnf_install: gcc rpm-devel git python3-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# HOWTO: https://pre-commit.com/#usage | ||
# pip3 install pre-commit | ||
# pre-commit install | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.2.3 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: flake8 | ||
args: | ||
- --max-line-length=120 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.711 | ||
hooks: | ||
- id: mypy | ||
args: [--no-strict-optional, --ignore-missing-imports] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[tox] | ||
skipsdist = True | ||
envlist = py36,py37,py38,py39,py310,py311,py312 | ||
|
||
[testenv] | ||
commands = python3 -m pytest --color=yes -v --showlocals tests/ | ||
deps = | ||
pytest | ||
flexmock |