test: loadtest tracking memory/cpu usage #478
Workflow file for this run
This file contains hidden or 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, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pg-version: ['12', '13', '14', '15', '16', '17'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
- name: Use Cachix Cache | |
uses: cachix/cachix-action@v16 | |
with: | |
name: nxpg | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Build | |
run: nix-shell --run "xpg -v ${{ matrix.pg-version }} build" | |
- name: Run tests | |
run: nix-shell --run "xpg -v ${{ matrix.pg-version }} test" | |
# solve https://github.com/supabase/pg_net/pull/178#issuecomment-2722690110 | |
#test-on-macos: | |
#runs-on: macos-15 | |
#strategy: | |
#matrix: | |
#pg-version: ['15'] | |
#steps: | |
#- uses: actions/checkout@v4 | |
#- name: Install Nix | |
#uses: cachix/install-nix-action@v30 | |
#with: | |
#nix_path: nixpkgs=channel:nixos-unstable | |
#- name: Use Cachix Cache | |
#uses: cachix/cachix-action@v16 | |
#with: | |
#name: xpg | |
#authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
#- name: Build | |
#run: nix-shell --run "xpg -v ${{ matrix.pg-version }} build" | |
#- name: Run tests | |
#run: nix-shell --run "nxpg -v ${{ matrix.pg-version }} test" | |
loadtest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
- name: Use Cachix Cache | |
uses: cachix/cachix-action@v16 | |
with: | |
name: nxpg | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Build | |
run: nix-shell --run "xpg build" | |
- name: Run load test | |
run: | | |
nix-shell --run "net-loadtest" | |
cat psrecord.md >> "$GITHUB_STEP_SUMMARY" | |
coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pg-version: ['17'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
- name: Use Cachix Cache | |
uses: cachix/cachix-action@v16 | |
with: | |
name: nxpg | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Coverage | |
run: nix-shell --run "xpg -v ${{ matrix.pg-version }} coverage" | |
- name: Send coverage to Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
files: ./build-${{ matrix.pg-version }}/coverage.info |