#282 Debug - 21 #44
This file contains 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: Go test linux - oracle | |
on: [push] | |
env: | |
SENZING_LOG_LEVEL: TRACE | |
SENZING_TOOLS_DATABASE_URL: "oci://sys:Passw0rd@oracle:1521/G2" | |
permissions: | |
contents: read | |
jobs: | |
go-test-linux: | |
name: "Go test with Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }} - oracle" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go: ["1.21"] | |
os: [ubuntu-latest] | |
senzingsdk-version: [staging-v4] | |
services: | |
oracle: | |
# https://container-registry.oracle.com/ords/ocr/ba/database/free | |
env: | |
ORACLE_PWD: Passw0rd | |
image: container-registry.oracle.com/database/free | |
ports: | |
- 1521:1521 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Set up gotestfmt | |
uses: gotesttools/gotestfmt-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Copy rootfs files | |
run: sudo cp --verbose --recursive rootfs/* / | |
- name: Copy testdata files | |
run: sudo cp --verbose --recursive testdata/oracle/rootfs/* / | |
- name: Install Senzing SDK | |
uses: senzing-factory/github-action-install-senzing-sdk@v3 | |
with: | |
packages-to-install: "senzingsdk-runtime senzingsdk-setup" | |
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }} | |
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }} | |
- name: Set environment variables | |
run: | | |
SENZING_PATH="/opt/senzing" | |
ORACLE_HOME="/opt/oracle/instantclient_23_7" | |
{ | |
echo "SENZING_PATH=${SENZING_PATH}" | |
echo "ORACLE_HOME=${ORACLE_HOME}" | |
echo "LD_LIBRARY_PATH="${SENZING_PATH}/er/lib:${ORACLE_HOME}" | |
echo "PATH="${PATH}:${ORACLE_HOME}" | |
} >> "$GITHUB_ENV" | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libaio1t64 libaio-dev tree | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/libaio.so.1 | |
- name: Install Oracle InstantClient | |
run: | | |
curl --output /tmp/instantclient-basic-linux.zip https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-basic-linux.x64-23.7.0.25.01.zip | |
sudo mkdir -p /opt/oracle | |
sudo unzip -d /opt/oracle /tmp/instantclient-basic-linux.zip | |
- name: Install Oracle SQL-plus | |
run: | | |
curl --output /tmp/instantclient-sqlplus-linux.zip https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-sqlplus-linux.x64-23.7.0.25.01.zip | |
sudo unzip -o -d /opt/oracle /tmp/instantclient-sqlplus-linux.zip | |
- name: View files | |
run: | | |
tree /opt/oracle | |
- name: Create database | |
run: | | |
/opt/oracle/instantclient_23_7/sqlplus sys/Passw0rd@localhost as sysdba "@/opt/oracle/sql/create_database.sql" | |
- name: Run go test | |
run: | | |
go test -json -v -p 1 ./... 2>&1 | tee /tmp/gotest.log | gotestfmt |