Skip to content

Commit 4cbf144

Browse files
authored
Convert circleci to github actions (#428)
* Add github actions files to test java versions * Add workflows for coverage, e2e, publish, snky
1 parent 9e9492f commit 4cbf144

File tree

7 files changed

+250
-0
lines changed

7 files changed

+250
-0
lines changed

.github/workflows/coverage.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Coverage process
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '8'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- id: spotless
25+
run: mvn spotless:check animal-sniffer:check test verify
26+
# - if: failure()
27+
# name: Test Spotless Failed
28+
# run: |
29+
# wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
30+
# chmod u+x slack-notify-branch.sh
31+
# BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
32+
- if: steps.spotless.conclusion == 'success'
33+
run: mvn -B package
34+
35+
- name: Run command cobertura
36+
run: mvn cobertura:cobertura
37+
- run: bash <(curl -s https://codecov.io/bash)

.github/workflows/e2e.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: e2e process
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
schedule:
9+
- cron: "5 * * * *"
10+
branches: [master, scheduled_e2_testing]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Set up JDK 8
21+
uses: actions/setup-java@v3
22+
with:
23+
java-version: '8'
24+
distribution: 'temurin'
25+
cache: maven
26+
27+
- id: spotless
28+
run: mvn spotless:check animal-sniffer:check test verify
29+
# - if: failure()
30+
# name: Test Spotless Failed
31+
# run: |
32+
# wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
33+
# chmod u+x slack-notify-branch.sh
34+
# BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
35+
- if: steps.spotless.conclusion == 'success'
36+
run: mvn -B package
37+
38+
- name: Run script e2e.sh
39+
run: .buildscript/e2e.sh

.github/workflows/java11.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Java CI 11
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '11'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- id: spotless
25+
run: mvn spotless:check animal-sniffer:check test verify
26+
# - if: failure()
27+
# name: Test Spotless Failed
28+
# run: |
29+
# wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
30+
# chmod u+x slack-notify-branch.sh
31+
# BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
32+
- if: steps.spotless.conclusion == 'success'
33+
run: mvn -B package

.github/workflows/java17.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Java CI 17
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- id: spotless
25+
run: mvn spotless:check animal-sniffer:check test verify
26+
# - if: failure()
27+
# name: Test Spotless Failed
28+
# run: |
29+
# wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
30+
# chmod u+x slack-notify-branch.sh
31+
# BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
32+
- if: steps.spotless.conclusion == 'success'
33+
run: mvn -B package

.github/workflows/java8.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Java CI 8
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '8'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- id: spotless
25+
run: mvn spotless:check animal-sniffer:check test verify
26+
# - if: failure()
27+
# name: Test Spotless Failed
28+
# run: |
29+
# wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
30+
# chmod u+x slack-notify-branch.sh
31+
# BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
32+
- if: steps.spotless.conclusion == 'success'
33+
run: mvn -B package

.github/workflows/publish.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish process
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '8'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- id: spotless
25+
run: mvn spotless:check animal-sniffer:check test verify
26+
# - if: failure()
27+
# name: Test Spotless Failed
28+
# run: |
29+
# wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
30+
# chmod u+x slack-notify-branch.sh
31+
# BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
32+
- if: steps.spotless.conclusion == 'success'
33+
run: mvn -B package
34+
35+
- name: Run script deploy_snapshot.sh
36+
run: .buildscript/deploy_snapshot.sh

.github/workflows/snyk.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Snyk process
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '8'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- id: spotless
25+
run: mvn spotless:check animal-sniffer:check test verify
26+
# - if: failure()
27+
# name: Test Spotless Failed
28+
# run: |
29+
# wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
30+
# chmod u+x slack-notify-branch.sh
31+
# BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
32+
- if: steps.spotless.conclusion == 'success'
33+
run: mvn -B package
34+
35+
- name: Run Snyk
36+
run: curl -sL https://raw.githubusercontent.com/segmentio/snyk_helpers/master/initialization/snyk.sh | sh
37+
env:
38+
SNYK_FAIL_ON: upgradable
39+
SNYK_SEVERITY_THRESHOLD: high

0 commit comments

Comments
 (0)