mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-10-05 13:01:58 +00:00
ci(tests): disable integration tests job and install psql client
This commit is contained in:
@@ -40,6 +40,7 @@ jobs:
|
|||||||
run: go test -race -count=1 ./pkg/...
|
run: go test -race -count=1 ./pkg/...
|
||||||
integration-tests:
|
integration-tests:
|
||||||
name: Integration Tests
|
name: Integration Tests
|
||||||
|
if: false # disabled for now
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -61,26 +62,31 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.24"
|
go-version: "1.24"
|
||||||
|
- name: Install PostgreSQL client
|
||||||
|
run: |
|
||||||
|
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo"
|
||||||
|
$SUDO apt-get update -qq
|
||||||
|
$SUDO apt-get install -y -qq postgresql-client
|
||||||
- name: Create test databases
|
- name: Create test databases
|
||||||
env:
|
env:
|
||||||
PGPASSWORD: postgres
|
PGPASSWORD: postgres
|
||||||
run: |
|
run: |
|
||||||
psql -h localhost -U postgres -c "CREATE DATABASE resolvespec_test;"
|
psql -h postgres -U postgres -c "CREATE DATABASE resolvespec_test;"
|
||||||
psql -h localhost -U postgres -c "CREATE DATABASE restheadspec_test;"
|
psql -h postgres -U postgres -c "CREATE DATABASE restheadspec_test;"
|
||||||
- name: Run resolvespec integration tests
|
- name: Run resolvespec integration tests
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
TEST_DATABASE_URL: "host=localhost user=postgres password=postgres dbname=resolvespec_test port=5432 sslmode=disable"
|
TEST_DATABASE_URL: "host=postgres user=postgres password=postgres dbname=resolvespec_test port=5432 sslmode=disable"
|
||||||
run: go test -tags=integration ./pkg/resolvespec -v -coverprofile=coverage-resolvespec-integration.out
|
run: go test -tags=integration ./pkg/resolvespec -v -coverprofile=coverage-resolvespec-integration.out
|
||||||
- name: Run restheadspec integration tests
|
- name: Run restheadspec integration tests
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
TEST_DATABASE_URL: "host=localhost user=postgres password=postgres dbname=restheadspec_test port=5432 sslmode=disable"
|
TEST_DATABASE_URL: "host=postgres user=postgres password=postgres dbname=restheadspec_test port=5432 sslmode=disable"
|
||||||
run: go test -tags=integration ./pkg/restheadspec -v -coverprofile=coverage-restheadspec-integration.out
|
run: go test -tags=integration ./pkg/restheadspec -v -coverprofile=coverage-restheadspec-integration.out
|
||||||
- name: Generate integration coverage
|
- name: Generate integration coverage
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
TEST_DATABASE_URL: "host=localhost user=postgres password=postgres dbname=resolvespec_test port=5432 sslmode=disable"
|
TEST_DATABASE_URL: "host=postgres user=postgres password=postgres dbname=resolvespec_test port=5432 sslmode=disable"
|
||||||
run: |
|
run: |
|
||||||
go tool cover -html=coverage-resolvespec-integration.out -o coverage-resolvespec-integration.html
|
go tool cover -html=coverage-resolvespec-integration.out -o coverage-resolvespec-integration.html
|
||||||
go tool cover -html=coverage-restheadspec-integration.out -o coverage-restheadspec-integration.html
|
go tool cover -html=coverage-restheadspec-integration.out -o coverage-restheadspec-integration.html
|
||||||
|
|||||||
Reference in New Issue
Block a user