Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
101 changes: 98 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,101 @@ jobs:
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}

tests_pavex_session_redis_linux:
name: "Tests for `pavex_session_redis` (linux)"
# Jobs with Dockerized `services` can only be run on Linux
runs-on: ubuntu-latest
# Extra services that must spun up before this crate can be tested
services:
redis:
image: redis:8
ports:
- "56379:6379"
options: >-
--health-cmd="redis-cli ping || exit 1"
--health-interval=5s
--health-timeout=5s
--health-retries=5
needs:
- build_clis_linux

permissions:
pull-requests: write
checks: write
# Run if it's a PR on the official repo or a push to `main`
if: |
(github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.args.named.sha != '' &&
contains(
github.event.client_payload.pull_request.head.sha,
github.event.client_payload.slash_command.args.named.sha
)) ||
(github.event_name == 'push' && github.event.repository.full_name == github.repository)
steps:
- name: Checkout repository from source repo
if: |
(github.event_name == 'push' && github.event.repository.full_name == github.repository)
uses: actions/checkout@v4
- name: Checkout repository from fork
if: |
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.args.named.sha != '' &&
contains(
github.event.client_payload.pull_request.head.sha,
github.event.client_payload.slash_command.args.named.sha
)
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.client_payload.pull_request.number }}/merge"
- uses: ./.github/actions/create-check
if: ${{ github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Tests pavex_session_redis (linux)
workflow: "Build and store docs artifacts"
run_id: ${{ github.run_id }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust stable toolchain
uses: actions-rust-lang/[email protected]
with:
components: rustfmt
rustflags: ""
cache-workspaces: "./libs -> ./target"
- name: Download pavex CLI artifact
uses: actions/download-artifact@v4
with:
name: pavex_cli_linux
path: ~/.cargo/bin
- name: Download pavexc CLI artifact
uses: actions/download-artifact@v4
with:
name: pavexc_cli_linux
path: ~/.cargo/bin
- name: Mark pavex as executable
env:
PAVEX: /home/runner/.cargo/bin/pavex
PAVEXC: /home/runner/.cargo/bin/pavexc
run: |
chmod +x ${{ env.PAVEX }}
chmod +x ${{ env.PAVEXC }}
- name: Activate pavex
env:
PAVEX_ACTIVATION_KEY: ${{ secrets.pavex_activation_key }}
run: |
pavex self activate
pavexc self setup
- name: Run tests
working-directory: libs
run: |
cargo test --all-features --package pavex_session_redis
- uses: ./.github/actions/finalize-check
if: ${{ always() && github.event_name != 'push' }}
with:
pr_number: ${{ github.event.client_payload.pull_request.number }}
job: Tests pavex_session_redis (linux)
conclusion: ${{ job.status }}
github_token: ${{ secrets.GITHUB_TOKEN }}


tests_linux:
name: "Run tests (linux)"
Expand Down Expand Up @@ -645,7 +740,7 @@ jobs:
- name: Run tests
working-directory: libs
run: |
cargo test --all-features --workspace --exclude="pavex_cli" --exclude="pavex_macros" --exclude="pavex_session_sqlx"
cargo test --all-features --workspace --exclude="pavex_cli" --exclude="pavex_macros" --exclude="pavex_session_sqlx" --exclude="pavex_session_redis"
- uses: ./.github/actions/finalize-check
if: ${{ always() && github.event_name != 'push' }}
with:
Expand Down Expand Up @@ -881,7 +976,7 @@ jobs:
- name: Run tests
working-directory: libs
run: |
cargo test --all-features --workspace --exclude="pavex_cli" --exclude="pavex_macros" --exclude="pavex_session_sqlx"
cargo test --all-features --workspace --exclude="pavex_cli" --exclude="pavex_macros" --exclude="pavex_session_sqlx" --exclude="pavex_session_redis"
- uses: ./.github/actions/finalize-check
if: ${{ always() && github.event_name != 'push' }}
with:
Expand Down Expand Up @@ -1111,7 +1206,7 @@ jobs:
- name: Run tests
working-directory: libs
run: |
cargo test --all-features --workspace --exclude="pavex_cli" --exclude="pavex_macros" --exclude="pavex_session_sqlx"
cargo test --all-features --workspace --exclude="pavex_cli" --exclude="pavex_macros" --exclude="pavex_session_sqlx" --exclude="pavex_session_redis"
- uses: ./.github/actions/finalize-check
if: ${{ always() && github.event_name != 'push' }}
with:
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ We contributors to Pavex:
- Donmai (@donmai-me)
- Leon Qadirie (@leonqadirie)
- Oliver Barnes (@oliverbarnes)
- Joe Hasson (@joehasson)
Loading
Loading