|
| 1 | +name: Build and test |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + |
| 6 | + pull_request: |
| 7 | + branches: [ develop ] |
| 8 | + |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | + repository_dispatch: |
| 12 | + types: [utPLSQL-build,utPLSQL-java-api-build] |
| 13 | + |
| 14 | +defaults: |
| 15 | + run: |
| 16 | + shell: bash |
| 17 | + |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + name: Test on JDK ${{ matrix.jdk }} with utPLSQL ${{ matrix.utplsql_version }} |
| 21 | + runs-on: ubuntu-latest |
| 22 | + env: |
| 23 | + ORACLE_VERSION: "gvenzl/oracle-xe:18.4.0-slim" |
| 24 | + UTPLSQL_VERSION: ${{matrix.utplsql_version}} |
| 25 | + UTPLSQL_FILE: ${{matrix.utplsql_file}} |
| 26 | + ORACLE_PASSWORD: oracle |
| 27 | + DB_URL: "127.0.0.1:1521:XE" |
| 28 | + DB_USER: app |
| 29 | + DB_PASS: app |
| 30 | + |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + 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"] |
| 35 | + utplsql_file: ["utPLSQL"] |
| 36 | + jdk: ['8'] |
| 37 | + include: |
| 38 | + - utplsql_version: "v3.0.0" |
| 39 | + jdk: '8' |
| 40 | + utplsql_file: "utPLSQLv3.0.0" |
| 41 | + services: |
| 42 | + oracle: |
| 43 | + image: gvenzl/oracle-xe:18.4.0-slim |
| 44 | + env: |
| 45 | + ORACLE_PASSWORD: oracle |
| 46 | + ports: |
| 47 | + - 1521:1521 |
| 48 | + options: >- |
| 49 | + --health-cmd healthcheck.sh |
| 50 | + --health-interval 10s |
| 51 | + --health-timeout 5s |
| 52 | + --health-retries 10 |
| 53 | + --name oracle |
| 54 | +
|
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v2 |
| 57 | + with: |
| 58 | + fetch-depth: 0 |
| 59 | + - uses: actions/setup-java@v2 |
| 60 | + with: |
| 61 | + distribution: 'adopt' |
| 62 | + java-version: ${{matrix.jdk}} |
| 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 and Test |
| 71 | + run: mvn verify jar:jar appassembler:assemble |
| 72 | + |
| 73 | + slack-workflow-status: |
| 74 | + if: always() |
| 75 | + name: Post Workflow Status To Slack |
| 76 | + needs: [ build ] |
| 77 | + runs-on: ubuntu-latest |
| 78 | + steps: |
| 79 | + - name: Slack Workflow Notification |
| 80 | + uses: Gamesight/slack-workflow-status@master |
| 81 | + with: |
| 82 | + repo_token: ${{secrets.GITHUB_TOKEN}} |
| 83 | + slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} |
| 84 | + name: 'Github Actions[bot]' |
| 85 | + icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png' |
0 commit comments