|
1 | 1 | name: Build and test |
2 | 2 | on: push |
3 | 3 | jobs: |
4 | | - db2: # https://hub.docker.com/r/ibmcom/db2 |
5 | | - runs-on: ubuntu-latest |
6 | | - services: |
7 | | - db2: |
8 | | - # To run locallly: |
9 | | - # docker run -it --priviledged=true --name db2container -p 50000:50000 -p 55000:55000 -e LICENSE=accept -e DB2INSTANCE=db2inst1 -e DB2INST1_PASSWORD=password -e DBNAME=testdb -e SAMPLEDB=true ibmcom/db2:11.5.0.0a |
10 | | - image: docker://ibmcom/db2:11.5.0.0a |
11 | | - # "--priviledged=true" is required. "‑‑ipc=host ‑‑cap‑add=IPC_OWNER" may work instead, though. |
12 | | - # |
13 | | - # Considerations for building and deploying DB2 Docker containers |
14 | | - # https://www.ibm.com/developerworks/jp/library/dm-1602-db2-docker-trs/index.html |
15 | | - options: --name "db2container" --privileged=true --health-cmd "su - db2inst1 -c \"db2 GET DBM CFG\"" --health-interval 20s --health-timeout 30s --health-retries 128 |
16 | | - ports: |
17 | | - - "50000:50000" |
18 | | - - "55000:55000" |
19 | | - env: |
20 | | - LICENSE: accept |
21 | | - DB2INSTANCE: db2inst1 |
22 | | - DB2INST1_PASSWORD: password |
23 | | - DBNAME: testdb |
24 | | - SAMPLEDB: true |
25 | | - steps: |
26 | | - - uses: actions/checkout@v2 |
27 | | - - uses: actions/setup-java@v2 |
28 | | - with: |
29 | | - java-version: 8 |
30 | | - distribution: 'zulu' |
31 | | - # TODO: Find a better way to wait for completing setup. |
32 | | - - name: Sleep for 5 minutes to complete all the DB2 setup process |
33 | | - run: sleep 300 |
34 | | - - name: List Docker containers |
35 | | - run: docker ps -a |
36 | | - - name: Show Docker logs |
37 | | - run: docker logs db2container |
38 | | - - name: Show DB2 configs |
39 | | - run: docker exec db2container su - db2inst1 -c "db2 \"GET DBM CFG\"" |
40 | | - - name: Install ksh to run installDSDriver |
41 | | - run: sudo apt-get install ksh |
42 | | - - name: Make working directory |
43 | | - run: mkdir "${{ github.workspace }}/clpplus" |
44 | | - - name: Download clpplus |
45 | | - # https://github.com/rickdesantis/docker-files/tree/e3bbc10080be9e31635223c23091526bc5d9eff6/clpplus |
46 | | - run: curl "https://raw.githubusercontent.com/rickdesantis/docker-files/master/clpplus/ibm_data_server_driver_package_linuxx64_v10.5.tar.gz" -o "${{ github.workspace }}/clpplus/ibm_data_server_driver_package_linuxx64_v10.5.tar.gz" |
47 | | - - name: Extract clpplus |
48 | | - run: tar zxf "${{ github.workspace }}/clpplus/ibm_data_server_driver_package_linuxx64_v10.5.tar.gz" -C "${{ github.workspace }}/clpplus" |
49 | | - - name: Make installDSDriver runnable |
50 | | - run: chmod +x installDSDriver |
51 | | - working-directory: "${{ github.workspace }}/clpplus/dsdriver" |
52 | | - - name: Run installDSDriver |
53 | | - run: ./installDSDriver |
54 | | - working-directory: "${{ github.workspace }}/clpplus/dsdriver" |
55 | | - - name: Dump installDSDriver.log |
56 | | - run: cat installDSDriver.log |
57 | | - working-directory: "${{ github.workspace }}/clpplus/dsdriver" |
58 | | - - name: List files |
59 | | - run: ls -C -R |
60 | | - working-directory: "${{ github.workspace }}" |
61 | | - - name: Run clpplus |
62 | | - run: "${{ github.workspace }}/clpplus/dsdriver/bin/clpplus -verbose 'db2inst1/password@127.0.0.1:50000/testdb' @${{ github.workspace }}/embulk-input-db2/src/test/resources/org/embulk/input/db2/test/expect/basic/setup.sql" |
63 | | - - name: Build with testing |
64 | | - run: ./gradlew --stacktrace :embulk-input-db2:check |
65 | | - env: |
66 | | - _JAVA_OPTIONS: "-Xmx2048m -Xms512m" |
67 | | - EMBULK_INPUT_DB2_TEST_CONFIG: "${{ github.workspace }}/ci/db2.yml" |
68 | | - EMBULK_INPUT_DB2_TEST_CLPPLUS_COMMAND: "${{ github.workspace }}/clpplus/dsdriver/bin/clpplus" |
69 | | - - uses: actions/upload-artifact@v2 |
70 | | - if: always() |
71 | | - with: |
72 | | - name: db2 |
73 | | - path: embulk-input-db2/build/reports/tests/test |
74 | 4 | mysql: |
75 | 5 | strategy: |
76 | 6 | fail-fast: false |
@@ -105,12 +35,6 @@ jobs: |
105 | 35 | with: |
106 | 36 | name: mysql |
107 | 37 | path: embulk-input-mysql/build/reports/tests/test |
108 | | - oracle: # https://hub.docker.com/_/oracle-database-enterprise-edition |
109 | | - runs-on: ubuntu-latest |
110 | | - steps: |
111 | | - - uses: actions/checkout@v2 |
112 | | - - name: Test for Oracle Database does not run on GitHub Actions. |
113 | | - run: echo "Test for Oracle Database does not run on GitHub Actions." |
114 | 38 | postgresql: |
115 | 39 | runs-on: ubuntu-latest |
116 | 40 | services: |
|
0 commit comments