Skip to content

fix;: failed jobs

fix;: failed jobs #12

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Run Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '5.0.x', '6.0.x', '7.0.x', '8.0.x' ]
steps:
- name: Get latest commit id of PostgreSQL 16
run: |
echo "PG_COMMIT_HASH=$(git ls-remote git://git.postgresql.org/git/postgresql.git refs/heads/REL_16_STABLE | awk '{print $1}')" >> $GITHUB_ENV
- name: Cache PostgreSQL 16 with AGE installed
uses: actions/cache@v3
id: pg16cache
with:
path: ~/pg16
key: ${{ runner.os }}-v1-pg16-${{ env.PG_COMMIT_HASH }}
- name: Get latest commit id of Apache AGE for PG 16
run: |
echo "AGE_COMMIT_HASH=$(git ls-remote https://github.com/apache/age.git refs/heads/release/PG16/1.5.0 | awk '{print $1}')" >> $GITHUB_ENV
- name: Install PostgreSQL 16 and AGE, create default user and databases
if: steps.pg16cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch REL_16_STABLE git://git.postgresql.org/git/postgresql.git ~/pg16source
cd ~/pg16source
./configure --prefix=$HOME/pg16 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
make install -j$(nproc) > /dev/null
git clone --depth 1 --branch release/PG16/1.5.0 https://github.com/apache/age.git ~/age16source
cd ~/age16source
make PG_CONFIG=$HOME/pg16/bin/pg_config install
cd ~/pg16
mkdir data
bin/initdb -D data
bin/pg_ctl -D data -l logfile start
bin/createuser -s postgres
bin/createdb -O "postgres" agedotnet_tests
- uses: actions/checkout@v4
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
# You can test your matrix by printing the current dotnet version
- name: Display dotnet version
run: dotnet --version
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test with dotnet
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: TestResults-${{ matrix.dotnet-version }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}