Skip to content

Issue #14: Migrate to GitHub Actions #12

Issue #14: Migrate to GitHub Actions

Issue #14: Migrate to GitHub Actions #12

Workflow file for this run

name: Run Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
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: Deploy INCEpTION for integration tests
timeout-minutes: 5
run: |
docker pull ghcr.io/inception-project/inception:latest
docker --name inception run -d \
-e 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' \
-p8080:8080 \
ghcr.io/inception-project/inception:latest
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/actuator/health)" != "200" ]]; do
echo "Waiting for service to become healthy..."
sleep 5
done
- name: Run tests
run: make coverage
- name: Shut down INCEpTION
timeout-minutes: 5
run: |
docker docker stop inception
- 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 }}