From 555b80ac988ff0ce3628e94bc60913c926884f38 Mon Sep 17 00:00:00 2001 From: Tim Abell Date: Tue, 30 Jan 2024 01:24:16 +0000 Subject: [PATCH] ci: Refactor - Use `working-directory` for sqlite test --- .github/workflows/main.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dbcfa82..a05e1ed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,33 +64,31 @@ jobs: - name: Install dependencies run: go get . + - name: Setup - sqlite + working-directory: sqlite + run: ./setup.sh + - name: Test - sqlite flags run: | - pushd . - cd sqlite - ./setup.sh - file="`pwd`/db/test.db" # relative path hack with pwd, otherwise not resolved. - popd go clean -testcache go test -v sse_test.go \ --driver=sqlite \ --display-name=testing-flags \ --live=true \ --listen-on-port=9999 \ - --sqlite-file="$file" \ + --sqlite-file="`pwd`/sqlite/db/test.db" \ 2>&1 | go-junit-report -iocopy -set-exit-code -out results-sqlite-flags-${{ matrix.go-version }}.xml + - name: Setup - sqlite (2) + working-directory: sqlite + run: ./setup.sh + - name: Test - sqlite env env: schemaexplorer_driver: sqlite schemaexplorer_live: false run: | - pushd . - cd sqlite - ./setup.sh - file="`pwd`/db/test.db" # relative path hack with pwd, otherwise not resolved. - export schemaexplorer_sqlite_file="$file" - popd + export schemaexplorer_sqlite_file="`pwd`/sqlite/db/test.db" go clean -testcache go test -v sse_test.go \ 2>&1 | go-junit-report -iocopy -set-exit-code -out results-sqlite-env-${{ matrix.go-version }}.xml