Skip to content

Commit 9ee3ddd

Browse files
Switch to github actions for CI (temporalio#659)
Switch to github actions for CI
1 parent bcdc8db commit 9ee3ddd

8 files changed

Lines changed: 68 additions & 65 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Continuous Integration"
2+
on: [push, pull_request]
3+
4+
jobs:
5+
validation:
6+
name: "Gradle wrapper validation"
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: gradle/wrapper-validation-action@v3
11+
12+
unittest:
13+
name: Unit Tests
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 15
16+
steps:
17+
- name: Checkout repo
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
submodules: recursive
22+
ref: ${{ github.event.pull_request.head.sha }}
23+
24+
- name: Run unit tests
25+
run: |
26+
docker compose -f ./docker/github/docker-compose.yaml up unit-test
27+
28+
copyright:
29+
name: Copyright and code format
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 20
32+
steps:
33+
- name: Checkout repo
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
submodules: recursive
38+
ref: ${{ github.event.pull_request.head.sha }}
39+
40+
- name: Set up Java
41+
uses: actions/setup-java@v4
42+
with:
43+
java-version: "11"
44+
distribution: "temurin"
45+
46+
- name: Set up Gradle
47+
uses: gradle/actions/setup-gradle@v3
48+
49+
- name: Run copyright and code format checks
50+
run: ./gradlew --no-daemon checkLicenseMain checkLicenses spotlessCheck

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

docker/buildkite/README.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docker/buildkite/copyright-and-code-format.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

docker/github/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Using Github Actions
2+
3+
Github action simply runs Docker containers. So it is easy to perform the
4+
same build locally that Github will do. To handle this, there are
5+
two different docker-compose files: one for Github and one for local.
6+
The Dockerfile is the same for both.
7+
8+
## Testing the build locally
9+
To run the build locally, start from the root folder of this repo and run the following command:
10+
```bash
11+
docker-compose -f docker/github/docker-compose.yaml run unit-test
12+
```
13+
14+
Note that Github action will run basically the same commands.
15+
16+
## Testing the build in Github Actions
17+
Creating a PR against the main branch will trigger the Github action.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
unit-test:
55
build:
66
context: ../../
7-
dockerfile: ./docker/buildkite/Dockerfile
7+
dockerfile: ./docker/github/Dockerfile
88
command: "./gradlew --no-daemon test"
99
environment:
1010
- "USER=unittest"

0 commit comments

Comments
 (0)