name: Run unit tests on: push: branches: - main jobs: build: runs-on: ubuntu-latest # For the moment, we just run with python 3.10 # strategy: # matrix: # python-version: [ 3.8, 3.9, 3.10 ] steps: - uses: actions/checkout@v2 # - name: Set up Python ${{ matrix.python-version }} - name: Set up Python 3.10 uses: actions/setup-python@v2 with: # python-version: ${{ matrix.python-version }} python-version: '3.10' - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r model_data/requirements/requirements.txt - name: Set dev AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} aws-region: eu-west-2 - name: Run tests with pytest run: | pip install -r model_data/requirements/dev.txt pip install -r backend/requirements/base.txt pytest # - name: Upload coverage to Codecov # uses: codecov/codecov-action@v2 # with: # token: ${{ secrets.CODECOV_TOKEN }} # fail_ci_if_error: true