generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
Add GitHub action to run tests #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f7eb710
Add GitHub action and skip failing tests
fmeheust 9c84e28
Skip and RunMigrations added to tests
fmeheust 98792b3
Go get
fmeheust 7d54ed4
Added health check
fmeheust 4a8d5ae
Changes to username and password
fmeheust 3f2845e
use env variable instead of secret
fmeheust 27f7a94
run on push and pull request
fmeheust 9aa7586
tests fail fast
fmeheust 9f27095
Avoid running several workflow runs on same branch at the same time
fmeheust 6a8da8d
run tests on push
fmeheust 2762146
Merge remote-tracking branch 'origin/HEAD' into fmeheust-testing
fmeheust cacec87
Update and rename job
fmeheust ccde2f6
Review comments
fmeheust ccd8fe1
cascade delete
fmeheust 1d2c485
No transaction
fmeheust ce2c079
Run migration instead of dropping table
fmeheust File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Run Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
GORM_ORACLEDB_USER: ${{ secrets.GORM_ORACLEDB_USER }} | ||
GORM_ORACLEDB_PASSWORD: ${{ secrets.GORM_ORACLEDB_PASSWORD }} | ||
GORM_ORACLEDB_CONNECTSTRING: ${{ secrets.GORM_ORACLEDB_CONNECTSTRING }} | ||
GORM_ORACLEDB_LIBDIR: /home/runner/work/_temp/instantclient_23_9 | ||
services: | ||
oracle: | ||
image: gvenzl/oracle-free:latest | ||
env: | ||
APP_USER: ${{ env.GORM_ORACLEDB_USER }} | ||
APP_USER_PASSWORD: ${{ env.GORM_ORACLEDB_PASSWORD }} | ||
ORACLE_RANDOM_PASSWORD: yes | ||
ports: | ||
- 1521:1521 | ||
steps: | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.24.4' | ||
|
||
- name: Install Oracle Instant Client | ||
run: | | ||
cd $RUNNER_TEMP | ||
# Download the desired Oracle Instant Client zip files | ||
curl -sSfLO "https://download.oracle.com/otn_software/linux/instantclient/2390000/instantclient-basic-linux.x64-23.9.0.25.07.zip" | ||
# Unzip the packages into a single directory | ||
unzip -q -o "instantclient-basic-linux.x64-23.9.0.25.07.zip" | ||
# Install the operating system libaio package | ||
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/libaio.so.1 | ||
# Update the runtime link path | ||
echo "/home/runner/work/_temp/instantclient_23_9" | sudo tee /etc/ld.so.conf.d/oracle-instantclient.conf | ||
sudo ldconfig | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run all tests under tests directory | ||
run: | | ||
cd tests | ||
go get -t github.com/oracle-samples/gorm-oracle/tests | ||
go get . | ||
go test -failfast |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a condition to ignore the error if the table doesn't exist and returns ORA-00942?