Keepers 44392ab8b2
adds env-based integration test controls (#128)
* adds env-based integration test controls

Some integration tests were running locally without being told
to do so via env variables.  This adds some controllers for validating
if and when those tests should run, and for ensuring the env
variables necessary to run the test are available.

* testing helper comments, func name change

* add testing timeOf log, skip gc ci tests

* corrected the test skip in GC_test

* update kopia_test with helpers

* rename /testing files to *_test.go

This will ensure these files do not compile into the release binary.

* Revert "rename /testing files to *_test.go"

This reverts commit 04fd2046cc6d11bf3e3eb98d98a3e84b1bba6366.
2022-06-06 13:17:40 -06:00

53 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: ['**']
pull_request:
branches: [main]
permissions:
# required to retrieve AWS credentials
id-token: write
# required to retrieve repository
contents: read
jobs:
Run-All:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Repo Code Checkout
uses: actions/checkout@v3
- name: Golang Setup
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run go mod download
run: go mod download
- name: Get go-licenses
run: go install github.com/google/go-licenses@latest
- name: Run go-licenses
run: go-licenses check github.com/alcionai/corso --ignore github.com/alcionai/corso
- name: Run gofmt
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::951767375776:role/corso-testing-role
role-session-name: integration-testing
aws-region: us-east-1
- run: echo "Running ${{ github.repository }} deployment unit tests at ${{ env.TIME_OF_TEST }}."
- name: Deployment Tests
env:
CORSO_CI_TESTS: true
CORSO_PASSWORD: ${{ secrets.INTEGRATION_TEST_CORSO_PASSWORD }}
run: go test ./...