-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d698487
commit 6467ff6
Showing
1 changed file
with
43 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,43 @@ | ||
name: guillotina_elasticsearch | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, 3.10] | ||
database: ["DUMMY", "postgres"] | ||
env: | ||
DATABASE: ${{ matrix.database }} | ||
steps: | ||
# Checkout the repository first | ||
- uses: actions/checkout@v2 | ||
|
||
# Setup the python version | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Linters and typing | ||
- name: Pre-checks | ||
run: | | ||
# Install | ||
pip install flake8 isort black==22.10.0 | ||
# Run commands | ||
flake8 guillotina_audit --config=setup.cfg | ||
isort -c -rc guillotina_audit | ||
black --check --verbose guillotina_elasticsearch | ||
# Run tests | ||
- name: Run tests | ||
run: | | ||
# Install package with test dependecies | ||
pip install -e .[test] | ||
# Run tests | ||
pytest --capture=no --tb=native -v guillotina_audit --cov=guillotina_audit --cov-report term-missing --cov-append guillotina_audit |