Df 86 caching markdowns in database (#31) #334
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: CI | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
env: | |
DATALAND_URL: ${{ vars.DATALAND_URL }} | |
DATALAND_API_KEY: ${{ secrets.DATALAND_API_KEY }} | |
AZURE_OPENAI_API_KEY: "null" | |
AZURE_OPENAI_ENDPOINT: "null" | |
AZURE_DOCINTEL_API_KEY: "null" | |
AZURE_DOCINTEL_ENDPOINT: "null" | |
POSTGRES_PASSWORD: "null" | |
POSTGRES_USER: "null" | |
PGADMIN_DEFAULT_EMAIL: "null" | |
PGADMIN_DEFAULT_PASSWORD: "null" | |
DATABASE_CONNECTION_STRING: "postgresql+pg8000://postgres:postgres@localhost:5432/dataland_qa_lab" | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: dataland_qa_lab | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd "pg_isready -U postgres" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
- name: Generate API clients | |
run: ./bin/generate_dataland_api_clients.sh | |
- name: Install dependencies | |
run: pdm install | |
- name: Check formatting | |
run: pdm run ruff format --check | |
- name: Check linting | |
if: always() | |
run: pdm run ruff check | |
- name: Run tests | |
if: always() | |
env: | |
DATABASE_URL: "postgresql+pg8000://postgres:postgres@localhost:5432/dataland_qa_lab" | |
run: pdm run test-cov | |
- name: Run doctests | |
if: always() | |
run: pdm run doctest-cov | |
- name: Export coverage | |
if: always() | |
run: pdm run combine-coverage && pdm run export-coverage | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
if: always() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |