-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first attempt to load unit tests, integration tests, and codecov via …
…GH CI
- Loading branch information
Showing
12 changed files
with
168 additions
and
49 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 |
---|---|---|
@@ -1 +1 @@ | ||
test --test_output=all | ||
test --test_size_filters=small,medium --test_output=all --test_verbose_timeout_warnings |
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 @@ | ||
6.2.0 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Code Coverage | ||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
|
||
jobs: | ||
code_coverage: | ||
name: Bazel - Code Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: bazelbuild/setup-bazelisk@v2 | ||
- name: Mount bazel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Build via bazel | ||
run: bazel build //... | ||
|
||
- name: Run bazel code-coverage | ||
run: bazel coverage --nocache_test_results ...:all |
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,69 @@ | ||
name: Integration Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
integration_tests: | ||
name: Integration Testing - S3 Download and Retrieval of Test PKG file | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: bazelbuild/setup-bazelisk@v2 | ||
- name: Mount bazel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Setup minio S3 bucket | ||
run: | | ||
wget https://dl.min.io/server/minio/release/linux-amd64/minio | ||
chmod +x minio | ||
MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin ./minio server /tmp --address ":9000" --console-address ":9001" & | ||
- name: Setup minio S3 bucket | ||
run: | | ||
export AWS_ACCESS_KEY_ID=minioadmin | ||
export AWS_SECRET_ACCESS_KEY=minioadmin | ||
export AWS_EC2_METADATA_DISABLED=true | ||
aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test | ||
- name: Build via bazel | ||
run: bazel build //... | ||
|
||
- name: Setup /tmp folder to test Pantri out | ||
run: | | ||
mkdir -p /tmp/some_git_project | ||
cp ./bazel-bin/pantri_but_go_/pantri_but_go /tmp/some_git_project/pantri_but_go | ||
chmod a+x /tmp/some_git_project/pantri_but_go | ||
- name: Init Pantri from bazel build output | ||
run: | | ||
export AWS_ACCESS_KEY_ID=minioadmin | ||
export AWS_SECRET_ACCESS_KEY=minioadmin | ||
cd /tmp/some_git_project | ||
./pantri_but_go init /tmp/some_git_project --backend_address http://127.0.0.1:9000/test --store_type=s3 --region="us-east-1" | ||
- name: Download and Upload some small package to Pantri test S3/minio bucket | ||
run: | | ||
export AWS_ACCESS_KEY_ID=minioadmin | ||
export AWS_SECRET_ACCESS_KEY=minioadmin | ||
cd /tmp/some_git_project | ||
wget https://github.com/macadmins/nudge/releases/download/v1.1.11.81465/Nudge_Suite-1.1.11.81465.pkg -O nudge_suite.pkg | ||
./pantri_but_go upload nudge_suite.pkg --vv --debug | ||
- name: Test File Retrieval with Pantri from test S3/minio bucket | ||
run: | | ||
export AWS_ACCESS_KEY_ID=minioadmin | ||
export AWS_SECRET_ACCESS_KEY=minioadmin | ||
cd /tmp/some_git_project | ||
rm -f ./nudge_suite.pkg | ||
./pantri_but_go retrieve nudge_suite.pkg.pfile --vv --debug |
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,52 @@ | ||
name: Lint and Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
golangci_lint: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests | ||
name: golangci_lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.18' | ||
cache: true | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: --verbose | ||
|
||
bazel_tests: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
runs-on: ubuntu-latest | ||
name: Bazel - Tests | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: bazelbuild/setup-bazelisk@v2 | ||
- name: Mount bazel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
- name: Build via bazel | ||
run: bazel build //... | ||
- name: Test via bazel | ||
run: bazel test //... |
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 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