Skip to content

Merge pull request #198 from cybozu-go/bump-2.4.5 #272

Merge pull request #198 from cybozu-go/bump-2.4.5

Merge pull request #198 from cybozu-go/bump-2.4.5 #272

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- "main"
defaults:
run:
working-directory: v2
jobs:
test:
name: Small test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: v2/go.mod
- run: make setup
- run: make test-tools
- run: make check-generate
- run: make code-check
- run: make test
timeout-minutes: 20
- run: make test-dcnet
timeout-minutes: 20
- run: make test-vm
timeout-minutes: 20
e2e:
name: End-to-end Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.NECO_TEST_SERVICE_ACCOUNT }}
- uses: google-github-actions/setup-gcloud@v2
- name: Set GCP instance name
run: "echo INSTANCE_NAME=placemat-${{ github.run_number }}-$(TZ=Asia/Tokyo date +%H%M%S) >> $GITHUB_ENV"
- name: Run e2e test on GCP instance
run: ../bin/run-mtest.sh
- name: Set the instance lifetime
run: |
. ../bin/env
$GCLOUD compute instances add-metadata ${INSTANCE_NAME} --zone ${ZONE} \
--metadata shutdown-at=$(date -Iseconds -d+30minutes)
if: failure()