Skip to content

Commit 7733c16

Browse files
committed
Adding Github Action to build and test the project
1 parent 5fa8d38 commit 7733c16

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

.github/workflows/build.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build and test
2+
on:
3+
push:
4+
branches: [ develop ]
5+
tags:
6+
- v*
7+
pull_request:
8+
branches: [ develop ]
9+
workflow_dispatch:
10+
repository_dispatch:
11+
types: [utPLSQL-build]
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
jobs:
18+
build:
19+
name: Test on JDK ${{ matrix.jdk }} with utPLSQL ${{ matrix.utplsql_version }}
20+
runs-on: ubuntu-latest
21+
env:
22+
ORACLE_VERSION: "gvenzl/oracle-xe:18.4.0-slim"
23+
UTPLSQL_VERSION: ${{matrix.utplsql_version}}
24+
UTPLSQL_FILE: ${{matrix.utplsql_file}}
25+
ORACLE_PASSWORD: oracle
26+
DB_URL: "127.0.0.1:1521:XE"
27+
DB_USER: app
28+
DB_PASS: app
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
utplsql_version: ["v3.0.1","v3.0.2","v3.0.3","v3.0.4","v3.1.1","v3.1.2","v3.1.3","v3.1.6","v3.1.7","v3.1.8","v3.1.9","v3.1.10","v3.1.11","develop"]
34+
utplsql_file: ["utPLSQL"]
35+
jdk: ['8']
36+
include:
37+
- utplsql_version: "v3.0.0"
38+
jdk: '8'
39+
utplsql_file: "utPLSQLv3.0.0"
40+
services:
41+
oracle:
42+
image: gvenzl/oracle-xe:18.4.0-slim
43+
env:
44+
ORACLE_PASSWORD: oracle
45+
ports:
46+
- 1521:1521
47+
options: >-
48+
--health-cmd healthcheck.sh
49+
--health-interval 10s
50+
--health-timeout 5s
51+
--health-retries 10
52+
--name oracle
53+
54+
steps:
55+
- uses: actions/checkout@v2
56+
with:
57+
fetch-depth: 0
58+
- uses: actions/setup-java@v2
59+
with:
60+
distribution: 'adopt'
61+
java-version: ${{matrix.jdk}}
62+
cache: 'maven'
63+
64+
- name: Install utplsql
65+
run: .travis/install_utplsql.sh
66+
67+
- name: Install demo project
68+
run: .travis/install_demo_project.sh
69+
70+
- name: Build
71+
run: mvn package -DskipTests
72+
- name: Test
73+
run: mvn package verify jar:jar appassembler:assemble
74+
75+
slack-workflow-status:
76+
if: always()
77+
name: Post Workflow Status To Slack
78+
needs: [ build, deploy ]
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Slack Workflow Notification
82+
uses: Gamesight/slack-workflow-status@master
83+
with:
84+
repo_token: ${{secrets.GITHUB_TOKEN}}
85+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
86+
name: 'Github Actions[bot]'
87+
icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png'

0 commit comments

Comments
 (0)