Skip to content

Commit

Permalink
move duplicated env variable declarations to the workflow and job levels
Browse files Browse the repository at this point in the history
add job_id to nightly CRI logs

Signed-off-by: Dmitrii Ustiugov <dmitrii.ustiugov@epfl.ch>
  • Loading branch information
ustiugov committed Apr 18, 2021
1 parent 76d2ce1 commit f7a823a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 48 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/cri_minio_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GOROOT: $HOME/go

jobs:
minio-test:
Expand All @@ -16,13 +20,9 @@ jobs:

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
Expand All @@ -34,24 +34,15 @@ jobs:
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Start vHive cluster
run: ./scripts/cloudlab/start_onenode_vhive_cluster.sh

- name: modify $PATH
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: Setup minio
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: sleep 1m && make -C ./function-images/tests/save_load_minio local

- name: Test minio
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cri_stock_containerd_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/

jobs:
stock-containerd-test:
Expand All @@ -16,7 +17,7 @@ jobs:

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/cri_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath

jobs:
cri-tests:
name: CRI tests
env:
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_VHIVE_ARGS: "-dbg"
runs-on: [self-hosted, cri]

steps:

- name: Host Info
env:
GITHUB_RUN_ID: ${{ github.run_id }}
run: |
echo $HOSTNAME
echo $GITHUB_RUN_ID
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
Expand All @@ -50,18 +50,9 @@ jobs:
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Run vHive CRI tests
env:
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_VHIVE_ARGS: "-dbg"
run: make test-cri

- name: Archive log artifacts
Expand Down
31 changes: 14 additions & 17 deletions .github/workflows/nightly_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GOROOT: $HOME/go

jobs:
integration-tests:
name: Test all functions
runs-on: [self-hosted, nightly, integ]
steps:
- name: Setup TMPDIR
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
Expand Down Expand Up @@ -50,24 +57,23 @@ jobs:
fail-fast: false
matrix:
vhive_args: ["-dbg", "-dbg -snapshots", "-dbg -snapshots -upf"]
env:
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_JOB: ${{ github.job }}
GITHUB_VHIVE_ARGS: ${{ matrix.vhive_args }}

steps:

- name: Host Info
env:
GITHUB_RUN_ID: ${{ github.run_id }}
run: |
echo $HOSTNAME
echo $GITHUB_RUN_ID
echo $GITHUB_JOB
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
Expand All @@ -79,18 +85,9 @@ jobs:
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Run vHive CRI tests
env:
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_VHIVE_ARGS: $${{ matrix.vhive_args }}
run: |
echo vHive args are $GITHUB_VHIVE_ARGS
make test-cri
Expand All @@ -99,7 +96,7 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: ctrd-logs
name: ${{ github.job }}-ctrd-logs
path: |
/tmp/ctrd-logs/${{ github.run_id }}
Expand Down

0 comments on commit f7a823a

Please sign in to comment.