No issue: Only run unit tests during release build since we do not st… #30
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
name: Run Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
services: | |
inception: | |
image: ghcr.io/inception-project/inception:latest | |
env: | |
JAVA_OPTS: '-Dremote-api.enabled=true -Dsecurity.default-admin-username=test-remote -Dsecurity.default-admin-password={bcrypt}\$2a\$12\$fQ.9x17xCGbrGtvw45H20uMqbEjhLIPfoa13bLfM33e./nVuNvCWa -Dsecurity.default-admin-remote-access=true' | |
ports: | |
- 8080:8080 | |
options: >- | |
--health-cmd "curl -m 5 --silent --fail --request GET http://localhost:8080/actuator/health | grep -q '.*status.*:.*UP.*' || exit 1" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 20 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install poetry | |
make dependencies | |
- name: Lint with flake8 | |
run: make lint | |
- name: Run tests | |
run: make coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
token: ${{ secrets.CODECOV_TOKEN }} |