Skip to content

[FIX]Update request url used in Matomo #2039

[FIX]Update request url used in Matomo

[FIX]Update request url used in Matomo #2039

Workflow file for this run

---
name: Test Search API
on: [push, pull_request]
jobs:
build:
name: Build
strategy:
matrix:
python-version: [3.10.8]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ matrix.os }}-${{ hashFiles('app/requirements.pip') }}
restore-keys: build-${{ env.pythonLocation }}-${{ matrix.os }}-${{ hashFiles('app/requirements.pip') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r app/requirements.pip
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: true
matrix:
python-version: [3.10.8]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ matrix.os }}-${{ hashFiles('app/requirements.pip') }}
- name: unit tests
run: |
cd app
pytest tests/unit_tests -v
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
needs: [unit-tests]
strategy:
fail-fast: true
matrix:
python-version: [3.10.8]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ matrix.os }}-${{ hashFiles('app/requirements.pip') }}
- name: Run app
run: |
cd app
fastapi run &
echo "********** Application is up **********"
sleep 10
pytest tests/e2e_tests -v
env:
ELASTIC_URL: ${{secrets.ELASTIC_URL_DEV}}
ELASTIC_USER: ${{ secrets.ELASTIC_USER_DEV }}
ELASTIC_PASSWORD: ${{ secrets.ELASTIC_PASSWORD_DEV }}
ENV: ${{ secrets.ENV_DEV }}
DSN_SENTRY: ${{ secrets.DSN_SENTRY }}
METADATA_URL_CC_JSON: ${{ secrets.METADATA_URL_CC_JSON }}
lint-files:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade ruff
python -m pip install --upgrade black
# Include `--format=github` to enable automatic inline annotations.
- name: Run Ruff
run: ruff check --diff -- --format=github .
- name: Run Black
uses: psf/black@stable