Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin' into python3.8
  • Loading branch information
mirkan1 committed Jul 1, 2024
commit 344ac944e415fb5884efc26aa8fd131bc2680873
93 changes: 3 additions & 90 deletions .github/workflows/pre-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,93 +10,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
PythonLint:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- shell: bash
run: |-
poetry add -G dev flake8
- shell: bash
run: |-
export PATH=$PATH:/builder/home/.local/bin
./bin/flake8_tests.sh
PythonUnitTests:
timeout-minutes: 60

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: v0.12.1
- name: Build docker compose
uses: docker/bake-action@v4
with:
files: docker-compose.yml, docker-compose.ci.yml
load: true
- name: "Prepare test environment"
shell: bash
run: |-
docker compose -f docker-compose.ci.yml up -d postgres redis
- name: "Wait for postgres to start"
shell: bash
run: |-
for i in 1 2 3 4 5; do docker compose -f docker-compose.ci.yml run --rm postgres psql -h postgres -U postgres -c "SELECT 1 FROM pg_database WHERE datname = 'tests'" && break || sleep 2; done
- name: "Create tests database"
shell: bash
run: |-
docker compose -f docker-compose.ci.yml run --rm postgres psql -h postgres -U postgres -c "create database tests;"
- name: "List Enabled Query Runners"
shell: bash
run: |-
docker compose -f docker-compose.ci.yml run --rm server manage ds list_types
- name: "Execute unit tests"
shell: bash
run: |-
docker compose -f docker-compose.ci.yml run --user 0 --name tests server tests --junitxml=junit.xml --cov-report xml --cov=redash --cov-config .coveragerc tests/
- name: "Extract test results"
shell: bash
if: always()
run: |
docker cp tests:/app/coverage.xml ./coverage.xml
docker cp tests:/app/junit.xml ./results.xml
ls -l
- name: "Publish unit test report"
uses: mikepenz/action-junit-report@v4
if: always()
with:
fail_on_failure: true
report_paths: results.xml
require_tests: true
include_passed: true
summary: true
job_summary: true
check_name: "Unit Tests Report"
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
unit_tests:
uses: ./.github/workflows/test-unit.yaml
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/test-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.7'
python-version: '3.8'
- shell: bash
run: |-
python -m pip install -r requirements_bundles.txt flake8 --user
poetry add -G dev flake8
- shell: bash
run: |-
export PATH=$PATH:/builder/home/.local/bin
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.