@@ -2,23 +2,26 @@ name: Build and deploy snapshot
22
33on :
44 push :
5- branches-ignore : [ main ]
5+ branches : [ develop ]
66 pull_request :
77 branches : [ develop ]
88
99 workflow_dispatch :
1010
11- repository_dispatch :
12- type : [utPLSQL-build,utPLSQL-java-api-build]
13-
1411jobs :
1512 build :
1613
1714 runs-on : ubuntu-latest
15+ env :
16+ UTPLSQL_VERSION : develop
17+ UTPLSQL_FILE : utPLSQL
18+ DB_URL : " //localhost:1521/FREEPDB1"
19+ DB_USER : APP
20+ DB_PASS : pass
1821
1922 services :
2023 oracle :
21- image : gvenzl/oracle-xe:21 -slim
24+ image : gvenzl/oracle-free:23 -slim-faststart
2225 env :
2326 ORACLE_PASSWORD : oracle
2427 ports :
@@ -28,68 +31,52 @@ jobs:
2831 --health-interval 10s
2932 --health-timeout 5s
3033 --health-retries 10
34+ --name oracle
3135
3236 steps :
33- - uses : actions/checkout@v2
34- with :
35- fetch-depth : 0
37+ - uses : actions/checkout@v4
3638
3739 - name : Install utPLSQL
38- run : sh ${{ github.workspace }} /scripts/1_install_utplsql.sh
40+ run : .github /scripts/1_install_utplsql.sh
3941
4042 - name : Install demo project
41- run : sh ${{ github.workspace }} /scripts/2_install_demo_project.sh
43+ run : .github /scripts/2_install_demo_project.sh
4244
4345 - name : Set up JDK 17
44- uses : actions/setup-java@v2
46+ uses : actions/setup-java@v5
4547 with :
4648 java-version : ' 17'
47- distribution : ' adopt '
48- server-id : ossrh
49+ distribution : ' temurin '
50+ server-id : central
4951 server-username : MAVEN_USERNAME
5052 server-password : MAVEN_PASSWORD
5153 gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
5254 gpg-passphrase : MAVEN_GPG_PASSPHRASE
5355
5456 - name : Cache local Maven repository
55- uses : actions/cache@v2
57+ uses : actions/cache@v4
5658 with :
5759 path : ~/.m2/repository
5860 key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
5961 restore-keys : |
6062 ${{ runner.os }}-maven-
6163
6264 - name : Maven unit and integration tests with sonar
63- run : mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=org.utplsql:utplsql -maven-plugin
65+ run : mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=utPLSQL_utPLSQL -maven-plugin
6466 env :
6567 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6668 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
6769
6870 - name : Maven deploy snapshot
71+ if : github.event_name != 'pull_request'
6972 run : mvn deploy -DskipTests
7073 env :
7174 MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
7275 MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
7376 MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
7477
7578 - name : Publish unit test results
76- uses : EnricoMi/publish-unit-test-result-action@v1.24
79+ uses : EnricoMi/publish-unit-test-result-action@v2
7780 if : always()
7881 with :
7982 files : target/**/TEST**.xml
80-
81- slack-workflow-status :
82- if : always()
83- name : Post Workflow Status To Slack
84- needs : [ build ]
85- runs-on : ubuntu-latest
86- steps :
87- - name : Slack Workflow Notification
88- uses : Gamesight/slack-workflow-status@master
89- with :
90- # Required Input
91- repo_token : ${{secrets.GITHUB_TOKEN}}
92- slack_webhook_url : ${{secrets.SLACK_WEBHOOK_URL}}
93- # Optional Input
94- name : ' Github Actions[bot]'
95- icon_url : ' https://octodex.github.com/images/mona-the-rivetertocat.png'
0 commit comments