refactor: remove unnecessary memory context switches #642
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', '18'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/[email protected] | |
| - 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" | |
| test-on-macos: | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| pg-version: ['17'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/[email protected] | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable # needed to solve a bash error on CI | |
| - 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" | |
| loadtest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| params: [ {reqs: 10000, batch: 200}, {reqs: 20000, batch: 400}, {reqs: 40000, batch: 800} ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/[email protected] | |
| - 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 ${{ matrix.params.reqs }} ${{ matrix.params.batch }}" >> "$GITHUB_STEP_SUMMARY" | |
| coverage: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| pg-version: ['17'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/[email protected] | |
| - 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 |