Split test runs in Github workflow into unit tests, integration test … #335
Workflow file for this run
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: Build and test project | |
on: [ push ] | |
jobs: | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python & Poetry Environment | |
uses: ./.github/actions/prepare_poetry_env | |
- name: Install Lua environment | |
run: ./scripts/install_lua_environment.sh | |
- name: Poetry install | |
run: ./scripts/run_in_dev_env.sh poetry install | |
- name: Run Lua unit tests and static code analyzer | |
run: ./scripts/run_in_dev_env.sh ./scripts/lua_tests.sh | |
- name: Build language container | |
run: ./build_language_container.sh | |
- name: Run Python unit tests | |
run: ./scripts/run_in_dev_env.sh poetry run pytest tests/unit_tests | |
- name: Run Python integration tests without db | |
run: ./scripts/run_in_dev_env.sh poetry run pytest tests/integration_tests/without_db | |
- name: Start test environment | |
run: bash ./scripts/start_integration_test_environment.sh | |
- name: Run Python integration tests with db | |
run: ./scripts/run_in_dev_env.sh poetry run pytest tests/integration_tests/with_db |