Skip to content

Commit 4c684b0

Browse files
joelanfordestroz
andauthored
Run PR tests via GitHub Actions (#4253)
Co-authored-by: Eric Stroczynski <[email protected]>
1 parent 430f7af commit 4c684b0

File tree

6 files changed

+131
-0
lines changed

6 files changed

+131
-0
lines changed

.github/workflows/integration.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: integration
2+
on:
3+
pull_request: {}
4+
5+
jobs:
6+
integration:
7+
name: integration
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/setup-go@v2
11+
with:
12+
go-version: 1.15
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- run: make test-e2e-integration

.github/workflows/test-ansible.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: ansible
2+
on:
3+
pull_request: {}
4+
5+
jobs:
6+
e2e:
7+
name: e2e
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/setup-go@v2
11+
with:
12+
go-version: 1.15
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- run: sudo rm -rf /usr/local/bin/kustomize
17+
- run: make test-e2e-ansible
18+
19+
e2e-molecule:
20+
name: e2e-molecule
21+
runs-on: ubuntu-18.04
22+
steps:
23+
- uses: actions/setup-go@v2
24+
with:
25+
go-version: 1.15
26+
- uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0
29+
- run: sudo rm -rf /usr/local/bin/kustomize
30+
- run: |
31+
env
32+
export PATH=/opt/python/3.6.7/bin:${PATH}
33+
sudo apt-get install python3 python3-pip
34+
sudo pip3 install wheel
35+
sudo pip3 install --upgrade setuptools pip
36+
sudo pip3 install ansible~=2.9.13
37+
make test-e2e-ansible-molecule

.github/workflows/test-go.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: go
2+
on:
3+
pull_request: {}
4+
5+
jobs:
6+
e2e:
7+
name: e2e
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/setup-go@v2
11+
with:
12+
go-version: 1.15
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- run: sudo rm -rf /usr/local/bin/kustomize
17+
- run: make test-e2e-go
18+
19+
unit:
20+
name: unit
21+
runs-on: ubuntu-18.04
22+
steps:
23+
- uses: actions/setup-go@v2
24+
with:
25+
go-version: 1.15
26+
- uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0
29+
- run: make test-unit
30+
- uses: shogo82148/actions-goveralls@v1
31+
with:
32+
path-to-profile: coverage.out

.github/workflows/test-helm.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: helm
2+
on:
3+
pull_request: {}
4+
5+
jobs:
6+
e2e:
7+
name: e2e
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/setup-go@v2
11+
with:
12+
go-version: 1.15
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- run: sudo rm -rf /usr/local/bin/kustomize
17+
- run: make test-e2e-helm

.github/workflows/test-sanity.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: sanity
2+
on:
3+
pull_request: {}
4+
5+
jobs:
6+
sanity:
7+
name: sanity
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/setup-go@v2
11+
with:
12+
go-version: 1.15
13+
id: go
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- run: sudo rm -rf /usr/local/bin/kustomize
18+
- run: make test-sanity
19+
20+
links:
21+
name: doc links
22+
runs-on: ubuntu-18.04
23+
steps:
24+
- uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
submodules: recursive
28+
- run: make test-links

hack/tests/e2e-ansible-molecule.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ header_text "Running tests to check ansible molecule"
1010
ROOTDIR="$(pwd)"
1111
TMPDIR="$(mktemp -d)"
1212
trap_add 'rm -rf $TMPDIR' EXIT
13+
export PATH=${HOME}/.local/bin:${PATH}
1314
pip3 install --user pyasn1==0.4.7 pyasn1-modules==0.2.6 idna==2.8 ipaddress==1.0.22
1415
pip3 install --user molecule==3.0.2
1516
pip3 install --user ansible-lint yamllint

0 commit comments

Comments
 (0)