Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
amh4r committed Oct 22, 2023
1 parent c7f8d1c commit 76e3a76
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Python CI

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.10]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install
run: make install

- name: Format check
run: make format-check

- name: Lint
run: make lint

- name: Type check
run: make type-check

- name: Unit test
run: make utest

- name: Integration test
run: make itest
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check-venv:
@if [ -z "$$VIRTUAL_ENV" ]; then \
@if [[ -z "$${CI}" ]] && [[ -z "$${VIRTUAL_ENV}" ]]; then \
echo "virtual environment is not activated"; \
exit 1; \
fi
Expand All @@ -15,7 +15,6 @@ format-check: check-venv
install: check-venv
@pip install '.[extra]' -c constraints.txt


itest: check-venv
@pytest tests

Expand Down

0 comments on commit 76e3a76

Please sign in to comment.