Skip to content

Commit

Permalink
Test GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Mar 28, 2024
1 parent 22bfdf2 commit c2e20f4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@ jobs:
with:
name: artifacts
path: /tmp/artifacts/
vcr-tests:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21.5"
- name: "Run vcr tests"
run: |
./scripts/github-actions/ga-vcr-test.sh
env:
GOPATH: /home/runner/go
ARTIFACTS: /tmp/artifacts
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
with:
name: artifacts
path: /tmp/artifacts/

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down
29 changes: 29 additions & 0 deletions scripts/github-actions/ga-vcr-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o nounset
set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
source ${REPO_ROOT}/scripts/shared-vars-public.sh
cd ${REPO_ROOT}
source ${REPO_ROOT}/scripts/fetch_ext_bins.sh && \
fetch_tools && \
setup_envs

cd ${REPO_ROOT}/
echo "Running e2e vcr tests..."
E2E_KUBE_TARGET=envtest \
RUN_E2E=1 E2E_GCP_TARGET=vcr VCR_MODE=record \
go test -test.count=1 -timeout 3600s -v ./tests/e2e -run TestAllInSeries/fixtures/computenodetemplate 2>&1

0 comments on commit c2e20f4

Please sign in to comment.