Set 2gb to rt oracle test #5
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
on: | |
push: | |
branches-ignore: | |
- 'maint' | |
- 'stable' | |
jobs: | |
rt_test_oracle8: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up for tests | |
shell: bash | |
run: | | |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV | |
echo "DOCKER_BUILDKIT=0" >> $GITHUB_ENV | |
- name: Checkout RT | |
uses: actions/checkout@v4 | |
- name: Cache .prove state | |
id: cache-prove-state | |
uses: actions/cache@v4 | |
with: | |
path: .prove | |
key: ${{ runner.os }}-oracle | |
- name: Build RT | |
shell: bash | |
run: | | |
docker network create rt | |
docker run --network rt --name oracle --shm-size 2gb -e ORACLE_PWD=password -d container-registry.oracle.com/database/free:23.3.0.0 bash -c "echo 'USE_SID_AS_SERVICE_LISTENER = on' >> /opt/oracle/product/23c/dbhomeFree/network/admin/listener.ora && /opt/oracle/runOracle.sh" | |
docker run -d -v $GITHUB_WORKSPACE:/rt --shm-size 2gb --name rt --env RT_TEST_DB_HOST=oracle --env RT_TEST_RT_HOST=172.16.0.0/255.240.0.0 --network rt --name rt bpssysadmin/rt-base-debian:RT-5.0.6-bullseye-testoracle-20240501 | |
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=Oracle --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps" | |
- name: Run RT tests | |
shell: bash | |
run: docker exec rt bash -c "cd /rt && RT_DBA_USER=system RT_DBA_PASSWORD=password RT_TEST_DB_SID=freepdb1 RT_TEST_WEB_HANDLER=inline make test" | |
- name: Get run time | |
if: always() | |
shell: bash | |
run: | | |
export RT_GA_END_TIME=$(date +%s) | |
echo RT_GA_START_TIME ${{ env.RT_GA_START_TIME }} | |
echo RT_GA_END_TIME $RT_GA_END_TIME | |
echo "RT_GA_END_TIME=$RT_GA_END_TIME" >> $GITHUB_ENV | |
export RT_GA_TEST_TIME=$(( RT_GA_END_TIME - ${{ env.RT_GA_START_TIME }} )) | |
# Convert seconds to HH::MM::SS | |
export RT_GA_TEST_TIME=$(date -u -d @"$RT_GA_TEST_TIME" +"%T") | |
echo "RT_GA_TEST_TIME=$RT_GA_TEST_TIME" >> $GITHUB_ENV | |
- name: Post results to Slack | |
if: ${{ always() && github.repository_owner == 'bestpractical' }} | |
uses: edge/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATIONS }} | |
with: | |
channel: '#github' | |
status: ${{ job.status }} | |
success_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests completed successfully in ${env.RT_GA_TEST_TIME}' | |
failure_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests failed in ${env.RT_GA_TEST_TIME}' | |
cancelled_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests cancelled in ${env.RT_GA_TEST_TIME}' | |
fields: | | |
[{ "title": "Configuration", "value": "RT Server, oracle 8.0", "short": true }, | |
{ "title": "URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}?check_suite_focus=true", "short": true }] | |