Skip to content

Handle 429 errors in retry_url #3159

Handle 429 errors in retry_url

Handle 429 errors in retry_url #3159

Workflow file for this run

name: Unit Tests
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [ 3.8 ]
os: [ ubuntu-20.04 ]
steps:
- name: Checkout ${{ matrix.python-version }}
uses: actions/checkout@v2
with:
lfs: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e observatory-api[tests]
pip install -e observatory-platform[tests]
- name: Check licenses
run: |
# stop the build if there are licensing issues
liccheck --sfile strategy.ini --rfile observatory-api/requirements.txt --level CAUTIOUS --reporting liccheck-output.txt --no-deps
liccheck --sfile strategy.ini --rfile observatory-platform/requirements.txt --level CAUTIOUS --reporting liccheck-output.txt --no-deps
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run unit tests with coverage
env:
TEST_AZURE_CONTAINER_NAME: ${{ secrets.TEST_AZURE_CONTAINER_NAME }}
TEST_AZURE_CONTAINER_SAS_TOKEN: ${{ secrets.TEST_AZURE_CONTAINER_SAS_TOKEN }}
TEST_AZURE_STORAGE_ACCOUNT_NAME: ${{ secrets.TEST_AZURE_STORAGE_ACCOUNT_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
TEST_GCP_DATA_LOCATION: ${{ secrets.TEST_GCP_DATA_LOCATION }}
TEST_GCP_BUCKET_NAME: ${{ secrets.TEST_GCP_BUCKET_NAME }}
TEST_GCP_PROJECT_ID: ${{ secrets.TEST_GCP_PROJECT_ID }}
TEST_GCP_SERVICE_KEY: ${{ secrets.TEST_GCP_SERVICE_KEY }}
GOOGLE_APPLICATION_CREDENTIALS: /tmp/google_application_credentials.json
TEST_TERRAFORM_TOKEN: ${{ secrets.TEST_TERRAFORM_TOKEN }}
TEST_TERRAFORM_ORGANISATION: ${{ secrets.TEST_TERRAFORM_ORGANISATION }}
AIRFLOW__CORE__LOAD_EXAMPLES: false
run: |
echo "${TEST_GCP_SERVICE_KEY}" | base64 --decode > /tmp/google_application_credentials.json
coverage run -m unittest discover -v
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: false