Skip to content

Commit a0dec8c

Browse files
Merge pull request #68 from Roblox/github_actions
Add github actions for CI.
2 parents 5e1a621 + d8a068d commit a0dec8c

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed

.circleci/config.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/config.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
name: config
1+
name: CI
22

33
on:
44
pull_request:
55
branches: [ master ]
6-
workflow_dispatch:
76

87
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
98
jobs:
@@ -12,4 +11,8 @@ jobs:
1211
steps:
1312
- uses: actions/checkout@v2
1413
- name: Run containerd-driver integration tests
15-
run: make test
14+
run: |
15+
mkdir -p /home/runner/go/src/github.com/Roblox
16+
ln -s /home/runner/work/nomad-driver-containerd/nomad-driver-containerd /home/runner/go/src/github.com/Roblox/nomad-driver-containerd
17+
cd /home/runner/go/src/github.com/Roblox/nomad-driver-containerd
18+
make test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# nomad-driver-containerd
2-
[![CircleCI](https://circleci-github.rcs.simulpong.com/gh/Roblox/nomad-driver-containerd/tree/master.svg?style=shield&circle-token=559609ed9ed99da393798c76f4db004f3cd66801)](https://circleci-github.rcs.simulpong.com/gh/Roblox/nomad-driver-containerd/tree/master)
2+
[![CI Actions Status](https://github.com/Roblox/nomad-driver-containerd/workflows/CI/badge.svg)](https://github.com/Roblox/nomad-driver-containerd/actions)
33
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Roblox/nomad-driver-containerd/blob/master/LICENSE)
44
[![Release](https://img.shields.io/badge/version-0.6-blue)](https://github.com/Roblox/nomad-driver-containerd/releases/tag/v0.6)
55

tests/run_tests.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ export NOMAD_VERSION=1.0.2
66
export CONTAINERD_VERSION=1.3.4
77
export PATH=$PATH:/usr/local/go/bin
88
export PATH=$PATH:/usr/local/bin
9-
if [ -e /home/circleci ]; then
10-
export GOPATH=/home/circleci/go
9+
if [ -e /home/runner ]; then
10+
export GOPATH=/home/runner/go
1111
else
12-
export GOPATH=$HOME/go
12+
export GOPATH=$HOME/go
1313
fi
1414
export GO_VERSION=1.14.3
1515
export SRCDIR=`dirname $0`
@@ -60,7 +60,7 @@ run_tests() {
6060
}
6161

6262
warn_on_local_host() {
63-
if [[ -z "$CIRCLECI" || "$CIRCLECI" != "true" ]]; then
63+
if [[ -z "$GITHUB_ACTIONS" || "$GITHUB_ACTIONS" != "true" ]]; then
6464
echo "WARNING: Local host detected."
6565
echo "WARNING: These tests are designed to be run as part of continous integration (CI) and not recommended to be run on local host."
6666
echo "WARNING: These tests are destructive and can modify (or destroy) software on your host system."
@@ -75,7 +75,7 @@ warn_on_local_host() {
7575
}
7676

7777
setup() {
78-
if [[ -z "$CIRCLECI" || "$CIRCLECI" != "true" ]]; then
78+
if [[ -z "$GITHUB_ACTIONS" || "$GITHUB_ACTIONS" != "true" ]]; then
7979
echo "INFO: Running tests on local host (vagrant VM). Setup is not required."
8080
return 0
8181
fi
@@ -128,6 +128,8 @@ EOF
128128

129129
sudo mv containerd.service /lib/systemd/system/containerd.service
130130
sudo systemctl daemon-reload
131+
echo "INFO: Unmask containerd.service"
132+
sudo systemctl unmask containerd
131133
echo "INFO: Starting containerd daemon."
132134
sudo systemctl start containerd
133135
is_systemd_service_active "containerd.service"

tests/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ is_container_active() {
1111
if [ $? -eq 0 ]; then
1212
echo "INFO: ${job_name} container is up and running"
1313
if [ "$is_sleep" = true ]; then
14-
sleep 5s
14+
sleep 7s
1515
fi
1616
break
1717
fi

0 commit comments

Comments
 (0)