Add Build and Test GHA workflow #5
Workflow file for this run
This file contains 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 a GitHub Actions port of the following Buildkite Pipeline: | |
#steps: | |
# - label: ":golang: build" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make ci-build" | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: build | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - wait | |
# | |
# - label: ":golang: unit test" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make unit-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: build | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: integration test" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make integration-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: db-integration-test | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional test with cassandra" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-cassandra | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional test with cassandra (ES8)" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-cassandra | |
# config: ./develop/buildkite/docker-compose-es8.yml | |
# | |
# # TODO(rodrigozhou): olivere client is incompatible with OpenSearch PIT | |
# # - label: ":golang: functional test with cassandra (OpenSearch 2)" | |
# # agents: | |
# # queue: "default" | |
# # docker: "*" | |
# # command: "make functional-test-coverage" | |
# # artifact_paths: | |
# # - ".coverage/*.out" | |
# # retry: | |
# # automatic: | |
# # limit: 1 | |
# # plugins: | |
# # - docker-compose#v3.8.0: | |
# # run: integration-test-cassandra | |
# # config: ./develop/buildkite/docker-compose-os2.yml | |
# | |
# - label: ":golang: functional xdc test with cassandra" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-xdc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-cassandra | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional ndc test with cassandra" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-ndc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-cassandra | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional test with mysql" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-mysql | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional xdc test with mysql" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-xdc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-mysql | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional ndc test with mysql" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-ndc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-mysql | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional test with mysql 8" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-mysql8 | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional xdc test with mysql 8" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-xdc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-mysql8 | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional ndc test with mysql 8" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-ndc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-mysql8 | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional test with postgresql" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-postgresql | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional xdc test with postgresql" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-xdc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-postgresql | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional ndc test with postgresql" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-ndc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-postgresql | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional test with postgresql 12" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-postgresql12 | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional xdc test with postgresql 12" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-xdc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-postgresql12 | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional ndc test with postgresql 12" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-ndc-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-xdc-postgresql12 | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - label: ":golang: functional test with sqlite" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "make functional-test-coverage" | |
# artifact_paths: | |
# - ".coverage/*.out" | |
# retry: | |
# automatic: | |
# limit: 1 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: integration-test-sqlite | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
# - wait | |
# | |
# - label: ":coverage: coverage-report" | |
# agents: | |
# queue: "default" | |
# docker: "*" | |
# command: "./develop/buildkite/scripts/coverage-report.sh" | |
# artifact_paths: | |
# - ".coverage/summary.out" | |
# - ".coverage/summary.out.html" | |
# retry: | |
# automatic: | |
# limit: 2 | |
# plugins: | |
# - docker-compose#v3.8.0: | |
# run: coverage-report | |
# config: ./develop/buildkite/docker-compose.yml | |
# | |
name: Build and Test | |
on: | |
push: | |
permissions: | |
contents: read | |
checks: write | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build docker-compose Image | |
run: | | |
docker-compose -f ./develop/buildkite/docker-compose.yml run --entrypoint '/bin/sh -c "git config --global --add safe.directory /temporal && make unit-test-coverage"' build | |
unit_test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run Unit Tests | |
run: | | |
docker-compose -f ./develop/buildkite/docker-compose.yml run --entrypoint '/bin/sh -c "git config --global --add safe.directory /temporal && make unit-test-coverage"' build | |
- name: Upload coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: unit-test-coverage | |
path: .coverage/*.out | |
integration_test: | |
name: Integration Test | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run Integration Tests | |
run: | | |
docker-compose -f ./develop/buildkite/docker-compose.yml run --entrypoint '/bin/sh -c "git config --global --add safe.directory /temporal && make integration-test-coverage"' db-integration-test | |
- name: Upload coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: integration-test-coverage | |
path: .coverage/*.out | |
functional_test_cassandra: | |
name: Functional Test with Cassandra | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run Functional Tests with Cassandra | |
run: | | |
docker-compose -f ./develop/buildkite/docker-compose.yml run --entrypoint '/bin/sh -c "git config --global --add safe.directory /temporal && make functional-test-coverage"' integration-test-cassandra | |
- name: Upload coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: functional-test-cassandra-coverage | |
path: .coverage/*.out | |
funtional_test_cassandra_es8: | |
name: Functional Test with Cassandra and Elasticsearch 8 | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run Functional Tests with Cassandra and Elasticsearch 8 | |
run: | | |
docker-compose -f ./develop/buildkite/docker-compose.yml run --entrypoint '/bin/sh -c "git config --global --add safe.directory /temporal && make functional-test-coverage"' integration-test-cassandra-es8 | |
- name: Upload coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: functional-test-cassandra-es8-coverage | |
path: .coverage/*.out | |