Merge pull request #23 from oracle-samples/m3update #60
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: ci | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**/**.md' | |
jobs: | |
run-parse-server-ci: | |
name: CI of Parse Server | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [7.3.0] | |
steps: | |
- name: Checkout parse-server ${{ matrix.version }} | |
uses: actions/checkout@v2 | |
with: | |
repository: parse-community/parse-server | |
ref: ${{ matrix.version }} | |
path: parse-server | |
- name: Checkout templateCodeAndSpecs | |
uses: actions/checkout@v2 | |
with: | |
repository: oracle-samples/oracleadapter-parse | |
ref: main | |
path: oraCodeAndSpecs | |
- name: Create Oracle Storage Adapter Dir | |
run: mkdir parse-server/src/Adapters/Storage/Oracle; | |
ls -la parse-server/src/Adapters/Storage/Oracle; | |
cp $PWD/oraCodeAndSpecs/*.js $PWD/parse-server/src/Adapters/Storage/Oracle; | |
ls -la parse-server/src/Adapters/Storage; | |
ls -la parse-server/src/Adapters/Storage/Oracle; | |
- name: Install Sqlcl | |
run: wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-23.3.0.270.1251.zip; | |
unzip sqlcl-23.3.0.270.1251.zip; | |
./sqlcl/bin/sql -V; | |
- name: Install Instant Client | |
run: uname -m; | |
wget https://download.oracle.com/otn_software/linux/instantclient/2340000/instantclient-basic-linux.x64-23.4.0.24.05.zip; | |
unzip instantclient-basic-linux.x64-23.4.0.24.05.zip; | |
ls -la; | |
ls -la $PWD/instantclient_23_4; | |
- name: Install libaio1 | |
run: sudo apt-get install libaio1; | |
- name: Move Oracle Tests | |
run: ls; | |
echo $PWD; | |
ls -la $PWD; | |
mv $PWD/oraCodeAndSpecs/spec/testExclusionList.json parse-server/spec; | |
mv $PWD/oraCodeAndSpecs/spec/jasmine.json parse-server/spec/support; | |
cat parse-server/spec/support/jasmine.json; | |
- name: Run Free23ai | |
run: docker run --name free23ai -d -p 1521:1521 -e ORACLE_PWD=Welcome12345 container-registry.oracle.com/database/free:latest; | |
docker ps -a; | |
docker images; | |
- name: Wait for container | |
run: sleep 120; | |
docker ps -a; | |
./sqlcl/bin/sql -V; | |
- name: Enable SODA in image | |
run: echo "alter session set container=FREEPDB1;grant db_developer_role to pdbadmin;grant soda_app to pdbadmin;GRANT UNLIMITED TABLESPACE TO pdbadmin;quit;" > soda; | |
cat soda; | |
./sqlcl/bin/sql sys/Welcome12345@localhost:1521/free as sysdba @./soda | |
- name: Run Tests | |
run: echo $PWD; | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash; | |
export NVM_DIR="$HOME/.nvm"; | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"; | |
nvm install v20.12.0; | |
nvm list; | |
node --version; | |
echo "Before setting LIB PATH"; | |
export LD_LIBRARY_PATH=${PWD}/instantclient_23_4; | |
echo "This is LD LIBRARY PATH"; | |
echo $LD_LIBRARY_PATH; | |
echo "Run it again"; | |
cd parse-server; | |
cat package.json; | |
npm install --save @parse/fs-files-adapter; | |
npm install [email protected]; | |
npm ci; | |
export UV_THREADPOOL_SIZE=128; | |
export PARSE_SERVER_TEST_DB=oracle; | |
export ORACLE_CLIENT_LOCATION=${LD_LIBRARY_PATH}; | |
export PARSE_SERVER_DATABASE_ADAPTER='{"module":"../Adapters/Storage/Oracle/OracleStorageAdapter","options":{"databaseURI":"oracledb://pdbadmin:Welcome12345@localhost:1521/freepdb1","collectionPrefix":"test_"}}'; | |
echo $PARSE_SERVER_DATABASE_ADAPTER; | |
npm run testonly; | |
# - name: Dump Container logs | |
# if: always() | |
# run: mkdir oralogs; | |
# docker cp free23ai:/opt/oracle/diag/rdbms/free/FREE/trace oralogs; | |
# docker cp free23ai:/opt/oracle/diag/rdbms/free/FREE oradumps; | |
# ls -la oralogs; | |
# ls -la oradumps; | |
# - name: Archive Test Results | |
# if: always() | |
# uses: actions/upload-artifact@v1 | |
# with: | |
# name: containerlogs | |
# path: oralogs/trace | |
# - name: Archive Test Results | |
# if: always() | |
# uses: actions/upload-artifact@v1 | |
# with: | |
# name: containerdumps | |
# path: oradumps | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true |