-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: migrating to GitHub actions (#40)
* migrating to GHA and removes CCI * removes CCI * addressed Aaron's comments
- Loading branch information
Showing
8 changed files
with
230 additions
and
167 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
|
||
# global | ||
* @hypertrace/graphql | ||
|
||
# GH action | ||
.github/ @aaron-steinfeld @jbahire @kotharironak @buchi-busireddy |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: merge-publish | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
merge-publish: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: create checksum file | ||
uses: hypertrace/actions/checksum@main | ||
|
||
- name: Cache packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle | ||
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }} | ||
restore-keys: | | ||
gradle-packages-${{ runner.os }}-${{ github.job }} | ||
gradle-packages-${{ runner.os }} | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_READ_USER }} | ||
password: ${{ secrets.DOCKERHUB_READ_TOKEN }} | ||
|
||
- name: push docker image | ||
uses: hypertrace/github-actions/gradle@main | ||
with: | ||
args: dockerPushImages | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_PUBLISH_USER }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: build and validate | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request_target: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
fetch-depth: 0 | ||
|
||
- name: create checksum file | ||
uses: hypertrace/github-actions/checksum@main | ||
|
||
- name: Cache packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle | ||
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }} | ||
restore-keys: | | ||
gradle-packages-${{ runner.os }}-${{ github.job }} | ||
gradle-packages-${{ runner.os }} | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_READ_USER }} | ||
password: ${{ secrets.DOCKERHUB_READ_TOKEN }} | ||
|
||
- name: Build with Gradle | ||
uses: hypertrace/github-actions/gradle@main | ||
with: | ||
args: build dockerBuildImages | ||
|
||
validate-helm-charts: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
fetch-depth: 0 | ||
|
||
- name: validate charts | ||
uses: hypertrace/github-actions/validate-charts@main | ||
|
||
snyk-scan: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
fetch-depth: 0 | ||
- name: Setup snyk | ||
uses: snyk/actions/[email protected] | ||
- name: Snyk test | ||
run: snyk test --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching='^runtimeClasspath$' | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: create checksum file | ||
uses: hypertrace/github-actions/checksum@main | ||
|
||
- name: Cache packages | ||
id: cache-packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle | ||
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }} | ||
restore-keys: | | ||
gradle-packages-${{ runner.os }}-${{ github.job }} | ||
gradle-packages-${{ runner.os }} | ||
- name: Unit test | ||
uses: hypertrace/github-actions/gradle@main | ||
with: | ||
args: jacocoTestReport | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
name: unit test reports | ||
fail_ci_if_error: true | ||
flags: unit | ||
|
||
- name: Publish Unit Test Results | ||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6 | ||
if: always() | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
files: ./**/build/test-results/**/*.xml |
Oops, something went wrong.