#120 Running tests in SaaS [run aws tests] (#131) #397
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.10"] | |
runs-on: ubuntu-20.04 | |
environment: aws | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 | |
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" | |
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }} | |
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }} | |
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }} | |
run: poetry run pytest tests |