This repository has been archived by the owner on Apr 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rolson Quadras <rolson.quadras@securekey.com>
- Loading branch information
1 parent
857f314
commit f9aba16
Showing
3 changed files
with
94 additions
and
95 deletions.
There are no files selected for viewing
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,94 @@ | ||
# | ||
# Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
name: "hub-auth ci" | ||
|
||
env: | ||
GO_VERSION: 1.17 | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
Checks: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Run checks | ||
run: | | ||
echo $PATH | ||
go env | ||
echo ${{ github.workspace }} | ||
make checks | ||
UnitTest: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Run unit test | ||
run: make unit-test | ||
- name: Upload coverage to Codecov | ||
run: | | ||
bash <(curl https://codecov.io/bash) | ||
env: | ||
CODECOV_UPLOAD_TOKEN: ${{ secrets.CODECOV_UPLOAD_TOKEN }} | ||
|
||
BDDTest: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Run BDD test | ||
run: | | ||
make bdd-test | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
Publish: | ||
needs: [Checks, UnitTest, BDDTest] | ||
if: github.event_name == 'push' && (github.repository == 'trustbloc/hub-auth' && github.ref == 'refs/heads/main') | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- run: | | ||
function logout { | ||
docker logout | ||
} | ||
trap logout EXIT | ||
git lfs install | ||
git lfs pull | ||
source ci/version_var.sh | ||
echo $DOCKER_PASSWORD | docker login ghcr.io --username $DOCKER_USER --password-stdin | ||
make hub-auth-docker | ||
docker tag ghcr.io/trustbloc/hub-auth:latest ${HUB_AUTH_PKG}:${HUB_AUTH_TAG} | ||
docker push ${HUB_AUTH_PKG}:${HUB_AUTH_TAG} | ||
env: | ||
DOCKER_USER: ${{ secrets.CR_USER }} | ||
DOCKER_PASSWORD: ${{ secrets.CR_PAT }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.