Skip to content

Commit

Permalink
Improve pool and Rust CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Jul 8, 2024
1 parent bcf6f27 commit 57a8adc
Show file tree
Hide file tree
Showing 12 changed files with 447 additions and 103 deletions.
4 changes: 4 additions & 0 deletions .github/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ all: workflows/nightly.yml \
workflows/dryrun.yml \
workflows/ls-nightly.yml \
workflows/tests.yml \
workflows/tests-pool.yml \
workflows/tests-managed-pg.yml \
workflows/tests-ha.yml \
workflows/tests-pg-versions.yml \
Expand All @@ -19,6 +20,9 @@ workflows/%.yml: workflows.src/%.tpl.yml workflows.src/%.targets.yml workflows.s
workflows.src/tests.tpl.yml: workflows.src/tests.inc.yml
touch $(ROOT)/workflows.src/tests.tpl.yml

workflows.src/tests-pool.tpl.yml: workflows.src/tests.inc.yml
touch $(ROOT)/workflows.src/tests-pool.tpl.yml

workflows.src/tests-managed-pg.tpl.yml: workflows.src/tests.inc.yml
touch $(ROOT)/workflows.src/tests-managed-pg.tpl.yml

Expand Down
1 change: 1 addition & 0 deletions .github/workflows.src/tests-pool.targets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data:
50 changes: 50 additions & 0 deletions .github/workflows.src/tests-pool.tpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<% from "tests.inc.yml" import build, calc_cache_key -%>

name: Pool Simulation Test

on:
push:
branches:
- master
- pool-test
paths:
- 'edb/server/connpool/**'
- 'edb/server/conn_pool/**'
- 'tests/test_server_pool.py'
- '.github/workflows/tests-pool.yml'
pull_request:
branches:
- master
paths:
- 'edb/server/connpool/**'
- 'edb/server/conn_pool/**'
- 'tests/test_server_pool.py'
- '.github/workflows/tests-pool.yml'

jobs:
test:
runs-on: ubuntu-latest
concurrency: pool-test
steps:
<%- call build() -%>
- name: Compute cache keys
run: |
<< calc_cache_key()|indent >>
<%- endcall %>

- name: Run the pool simulation test
env:
PYTHONPATH: .
SIMULATION_CI: yes
TIME_SCALE: 10
run: |
python tests/test_server_pool.py
- uses: EndBug/[email protected]
if: ${{ always() }}
continue-on-error: true
with:
branch: main
cwd: pool-simulation
author_name: github-actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com
6 changes: 3 additions & 3 deletions .github/workflows.src/tests.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
id: rust-cache
with:
path: build/rust_extensions
key: edb-rust-v3-${{ hashFiles('.tmp/rust_cache_key.txt') }}
key: edb-rust-v4-${{ hashFiles('.tmp/rust_cache_key.txt') }}
restore-keys: |
edb-rust-v3-
edb-rust-v4-
- name: Handle cached Cython extensions
uses: actions/cache@v4
Expand Down Expand Up @@ -368,7 +368,7 @@
id: rust-cache
with:
path: build/rust_extensions
key: edb-rust-v3-${{ hashFiles('.tmp/rust_cache_key.txt') }}
key: edb-rust-v4-${{ hashFiles('.tmp/rust_cache_key.txt') }}

- name: Restore cached Cython extensions
uses: actions/cache@v4
Expand Down
72 changes: 0 additions & 72 deletions .github/workflows/test-pool.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/tests-ha.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions .github/workflows/tests-managed-pg.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/tests-patches.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/tests-pg-versions.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 57a8adc

Please sign in to comment.