-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from kbase/develop
develop -> master (Release v0.1.3)
- Loading branch information
Showing
19 changed files
with
307 additions
and
194 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,38 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
push: | ||
# run workflow when merging to main or develop | ||
branches: | ||
- main | ||
- master | ||
- develop | ||
|
||
jobs: | ||
CodeQL-Build: | ||
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
# Override language selection by uncommenting this and choosing your languages | ||
with: | ||
languages: go | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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,11 @@ | ||
--- | ||
name: Manual Build & Push | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build-push: | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}-develop' | ||
tags: br-${{ github.ref_name }} | ||
secrets: inherit |
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,43 @@ | ||
--- | ||
name: Pull Request Build, Tag, & Push | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
- master | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
jobs: | ||
build-develop-open: | ||
if: github.base_ref == 'develop' && github.event.pull_request.merged == false | ||
uses: kbase/.github/.github/workflows/reusable_build.yml@main | ||
secrets: inherit | ||
build-develop-merge: | ||
if: github.base_ref == 'develop' && github.event.pull_request.merged == true | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}-develop' | ||
tags: pr-${{ github.event.number }},latest | ||
secrets: inherit | ||
build-main-open: | ||
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == false | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}' | ||
tags: pr-${{ github.event.number }} | ||
secrets: inherit | ||
build-main-merge: | ||
if: (github.base_ref == 'main' || github.base_ref == 'master') && github.event.pull_request.merged == true | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}' | ||
tags: pr-${{ github.event.number }},latest-rc | ||
secrets: inherit | ||
trivy-scans: | ||
if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false | ||
uses: kbase/.github/.github/workflows/reusable_trivy-scans.yml@main | ||
secrets: inherit |
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,25 @@ | ||
--- | ||
name: Release - Build & Push Image | ||
on: | ||
release: | ||
branches: | ||
- main | ||
- master | ||
types: [ published ] | ||
jobs: | ||
check-source-branch: | ||
uses: kbase/.github/.github/workflows/reusable_validate-branch.yml@main | ||
with: | ||
build_branch: '${{ github.event.release.target_commitish }}' | ||
validate-release-tag: | ||
needs: check-source-branch | ||
uses: kbase/.github/.github/workflows/reusable_validate-release-tag.yml@main | ||
with: | ||
release_tag: '${{ github.event.release.tag_name }}' | ||
build-push: | ||
needs: validate-release-tag | ||
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main | ||
with: | ||
name: '${{ github.event.repository.name }}' | ||
tags: '${{ github.event.release.tag_name }},latest' | ||
secrets: inherit |
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,87 @@ | ||
name: KBase Blobstore test | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
push: | ||
# run workflow when merging to main or develop | ||
branches: | ||
- main | ||
- master | ||
- develop | ||
|
||
env: | ||
AUTH2_JAR_NAME: kbase-auth2-test-shadow-all-0.7.0.jar | ||
|
||
jobs: | ||
workspace_deluxe_tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- go: '1.12' | ||
mongo: 'mongodb-linux-x86_64-3.6.12' | ||
minio: '2019-05-23T00-29-34Z' | ||
wired_tiger: 'false' | ||
- go: '1.12' | ||
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4' | ||
minio: '2019-05-23T00-29-34Z' | ||
wired_tiger: 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{matrix.go}} | ||
|
||
- name: Install dependencies and set up test config | ||
shell: bash | ||
run: | | ||
# set HOMEDIR | ||
export HOMEDIR=`pwd` | ||
# move to parent dir to install binaries etc | ||
cd .. | ||
# set up auth2 jar | ||
wget -q https://github.com/kbase/jars/raw/master/lib/jars/kbase/auth2/$AUTH2_JAR_NAME | ||
export AUTH2JAR=`pwd`/$AUTH2_JAR_NAME | ||
# set up mongo | ||
wget -q http://fastdl.mongodb.org/linux/${{matrix.mongo}}.tgz | ||
tar xfz ${{matrix.mongo}}.tgz | ||
export MONGOD=`pwd`/${{matrix.mongo}}/bin/mongod | ||
# set up minio | ||
export MINIO=$HOMEDIR/test_dependencies/minio/${{matrix.minio}}/minio | ||
gunzip $MINIO.gz | ||
chmod a+x $MINIO | ||
# set up test config | ||
cd $HOMEDIR | ||
cp -n test.cfg.example test.cfg | ||
sed -i "s#^test.temp.dir =.*#test.temp.dir=temp_test_dir#" test.cfg | ||
sed -i "s#^test.mongo.exe.*#test.mongo.exe=$MONGOD#" test.cfg | ||
sed -i "s#^test.minio.exe.*#test.minio.exe=$MINIO#" test.cfg | ||
sed -i "s#^test.mongo.wired_tiger.*#test.mongo.wired_tiger=${{matrix.wired_tiger}}#" test.cfg | ||
sed -i "s#^test.auth2jar.*#test.auth2jar=$AUTH2JAR#" test.cfg | ||
cat test.cfg | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
export GO111MODULE=on | ||
go build app/blobstore.go | ||
export TCFG=`pwd`/test.cfg | ||
BLOBSTORE_TEST_CFG=$TCFG go test -race -coverprofile=coverage.txt -covermode=atomic ./... | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: true |
This file was deleted.
Oops, something went wrong.
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 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 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 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 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 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
Oops, something went wrong.