-
Notifications
You must be signed in to change notification settings - Fork 3
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
a5294df
commit 75f0525
Showing
4 changed files
with
220 additions
and
53 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,67 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-format: | ||
name: Check linting and formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: pip update | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install dependencies | ||
run: python -m pip install build setuptools_scm[toml] | ||
|
||
- name: Install dependencies | ||
run: python -m pip install .[dev] | ||
|
||
- name: Lint | ||
run: python -m ruff . | ||
|
||
- name: Check format | ||
run: python -m ruff format . | ||
|
||
- name: Check Diff | ||
run: | | ||
DIFF="$(git diff --name-only)" | ||
if [ -z "$DIFF" ]; then | ||
echo "OK: Format is clean" | ||
else | ||
echo "Error: Format was not clean" | ||
echo "List of files:" | ||
echo "$DIFF" | ||
git diff | ||
exit 1 | ||
fi | ||
build-test: | ||
name: Build and test Python | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: pip update | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install dependencies | ||
run: python -m pip install build setuptools_scm[toml] | ||
|
||
- name: Install dependencies | ||
run: python -m pip install .[tests] | ||
|
||
- name: Run tests | ||
run: python -m pytest tests | ||
|
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
Empty file.
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,5 @@ | ||
from armonik_cli.admin import hello | ||
|
||
|
||
def test_hello(): | ||
assert hello() == "Hello, World!" |