feat(attachments): u#3728 t#4003 prevent download files from deleted attachment #781
Workflow file for this run
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
# This workflow will install Python dependencies and run tests with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: API - e2e | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ 'main' ] | |
paths: | |
- python/** | |
pull_request: | |
branches: [ '*' ] | |
paths: | |
- python/** | |
jobs: | |
newman: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.11' ] | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: taiga | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: '--health-cmd "pg_isready" --health-interval 5s --health-timeout 5s --health-retries 6 --health-start-period 20s' | |
name: Test on Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Postgres restore fixture | |
run: | | |
pg_restore --no-privileges --no-owner --dbname="postgres://postgres:postgres@localhost:5432/taiga" "./.github/sql-fixtures/fixtures.sql" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
**/setup.py | |
**/setup.cfg | |
**/requirements/*.txt | |
- name: Install requirements | |
working-directory: ./python/apps/taiga | |
run: | | |
python -m pip install --upgrade pip wheel setuptools | |
python -m pip install -r requirements/devel.txt | |
python -m pip install -e . | |
- name: Run back server | |
working-directory: ./python/apps/taiga | |
run: | | |
python -m taiga devserve -w > taiga-back.log 2> taiga-back.err & | |
env: | |
TAIGA_EVENTS__PUBSUB_BACKEND: "memory" | |
TAIGA_DEBUG: true | |
TAIGA_DB_NAME: taiga | |
TAIGA_DB_USER: postgres | |
TAIGA_DB_PASSWORD: postgres | |
TAIGA_DB_HOST: localhost | |
TAIGA_DB_PORT: 5432 | |
TAIGA_SECRET_KEY: secret | |
TAIGA_ACCESS_TOKEN_LIFETIME: 1000000 | |
- name: Postman API tests | |
run: | | |
newman run ./python/docs/postman/taiga.postman_collection_e2e.json \ | |
-e ./python/docs/postman/taiga.postman_environment.json --verbose \ | |
--reporters cli,json --reporter-json-export .github/workflows/artifacts/python-apps-taiga-api-tests.json | |
- name: Log test results as an artifact json | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-apps-taiga-api-tests.json | |
path: ./.github/workflows/artifacts/python-apps-taiga-api-tests.json | |
- name: Log taiga back server logs to an artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: taiga-back-log | |
path: ./python/apps/taiga/taiga-back.log | |
- name: Log taiga back server errors to an artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: taiga-back-err | |
path: ./python/apps/taiga/taiga-back.err |