diff --git a/.github/workflows/analytics_ci.yml b/.github/workflows/analytics_ci.yml new file mode 100644 index 000000000..d6cfd4470 --- /dev/null +++ b/.github/workflows/analytics_ci.yml @@ -0,0 +1,37 @@ +name: Analytics CI + +on: + push: + branches: [test-gh-action] + pull_request: + paths: + - "analytics/**" + +jobs: + check-migrations: + runs-on: ubuntu-latest + defaults: + run: + working-directory: analytics/ + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install requirements + run: pip install -r requirements.txt + + - name: Provide default env vars for django + run: cat dev/.env.docker-compose >> $GITHUB_ENV + + - name: Run tests + run: | + source dev/.env.docker-compose + docker compose up -d + pytest analytics/tests + env: + DJANGO_SETTINGS_MODULE: settings