Skip to content

Commit 8c833dd

Browse files
Add GitHub Actions
Added GitHub Actions to test both the Docker and Podman code paths since I was unable to get the Travis tests to work properly.
1 parent eb096f6 commit 8c833dd

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

.github/workflows/unit_test.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Unit Tests
2+
on:
3+
push:
4+
branches:
5+
# A test branch for seeing if your tests will pass in your personal fork
6+
- test_me_github
7+
pull_request:
8+
branches:
9+
- main
10+
- master
11+
jobs:
12+
docker-rspec:
13+
runs-on:
14+
- ubuntu-latest
15+
strategy:
16+
matrix:
17+
ruby:
18+
- 2.7
19+
- 2.6
20+
- 2.5
21+
- 2.4
22+
docker_version:
23+
- 5:19.03.8~3-0~ubuntu-bionic
24+
- 5:18.09.9~3-0~ubuntu-bionic
25+
- 18.06.3~ce~3-0~ubuntu
26+
fail-fast: true
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-ruby@v1
30+
with:
31+
ruby-version: ${{ matrix.ruby }}
32+
- name: install bundler
33+
run: |
34+
gem install bundler -v '~> 1.17.3'
35+
bundle update
36+
- name: install docker
37+
env:
38+
DOCKER_VERSION: ${{ matrix.docker_version }}
39+
run: sudo ./script/install_docker.sh ${DOCKER_VERSION} ${DOCKER_CE}
40+
- name: spec tests
41+
run: bundle exec rake
42+
43+
podman-rspec:
44+
runs-on:
45+
- ubuntu-latest
46+
strategy:
47+
matrix:
48+
ruby:
49+
- 2.7
50+
- 2.6
51+
- 2.5
52+
- 2.4
53+
fail-fast: true
54+
steps:
55+
- uses: actions/checkout@v2
56+
- uses: actions/setup-ruby@v1
57+
with:
58+
ruby-version: ${{ matrix.ruby }}
59+
- name: install bundler
60+
run: |
61+
gem install bundler -v '~> 1.17.3'
62+
bundle update
63+
- name: install podman
64+
run: sudo ./script/install_podman.sh
65+
- name: spec tests
66+
run: bundle exec rake

script/install_podman.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
set -ex
3+
4+
. /etc/os-release
5+
6+
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
7+
8+
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/ /" > /etc/apt/sources.list.d/podman.list
9+
10+
apt-get update
11+
12+
apt-get install -y podman

0 commit comments

Comments
 (0)