[run aws tests] #283
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: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8] | |
runs-on: ubuntu-latest | |
environment: aws | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python & Poetry Environment | |
uses: ./.github/actions/prepare_poetry_env | |
- name: Build Poetry | |
run: poetry build | |
- name: Install project whl | |
run: pip install dist/*.whl | |
- name: Install Lua dependencies | |
run: | | |
sudo apt-get install luarocks | |
sudo luarocks install --only-deps *.rockspec | |
- name: Run Lua unit tests and static code analyzer | |
run: poetry run poe lua-tests | |
- name: Setup integration test environment | |
run: ./scripts/setup_integration_test.sh | |
- name: Poetry run pytest integration tests | |
run: poetry run pytest tests | |
- name: Fail, if AWS-tests are not activated | |
if: "!contains(github.event.head_commit.message, '[run aws tests]')" | |
run: | | |
echo "Failed, because AWS-tests are not activated" | |
exit 1 | |
- name: Run AWS-tests if it is activated | |
if: "contains(github.event.head_commit.message, '[run aws tests]')" | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_ROLE: ${{ secrets.AWS_ROLE }} | |
AWS_DEFAULT_REGION: "eu-central-1" | |
run: poetry run pytest tests/ci_tests -s | |
- name: Archive DockerDB logs | |
if: success() || failure() | |
run: docker cp db_container_test:/exa/logs docker_db_logs | |
- name: Archive DockerDB logs | |
if: success() || failure() | |
uses: actions/upload-artifact@v1 | |
with: | |
name: docker_db_logs | |
path: docker_db_logs | |