Skip to content

Commit 2bc7558

Browse files
authored
Add functional test with vagrant (#509)
This PR adds functional test on CI withs `vagrant up` on GitHub Actions. Some VM settings updated for keep alive connection for `test_upload_large_file`. refs: https://github.com/jonashackt/vagrant-github-actions
1 parent 09122a3 commit 2bc7558

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,31 @@ jobs:
3030
bundler-cache: true
3131
- name: Run rubocop
3232
run: bundle exec rake lint
33+
34+
functional:
35+
runs-on: macos-10.15
36+
strategy:
37+
matrix:
38+
ruby: [ "2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "head" ]
39+
steps:
40+
- uses: actions/checkout@v3
41+
42+
- name: Cache Vagrant boxes
43+
uses: actions/cache@v2
44+
with:
45+
path: ~/.vagrant.d/boxes
46+
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
47+
restore-keys: |
48+
${{ runner.os }}-vagrant-
49+
50+
- name: Run vagrant up
51+
run: vagrant up
52+
53+
- name: Set up Ruby
54+
uses: ruby/setup-ruby@v1
55+
with:
56+
ruby-version: ${{ matrix.ruby }}
57+
bundler-cache: true
58+
59+
- name: Run functional tests
60+
run: bundle exec rake test:functional

Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ VAGRANTFILE_API_VERSION = "2"
33
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
44
config.vm.box = 'hashicorp/precise64'
55
config.vm.provision "shell", inline: <<-SHELL
6-
echo 'ClientAliveInterval 1' >> /etc/ssh/sshd_config
7-
echo 'ClientAliveCountMax 1' >> /etc/ssh/sshd_config
6+
echo 'ClientAliveInterval 3' >> /etc/ssh/sshd_config
7+
echo 'ClientAliveCountMax 3' >> /etc/ssh/sshd_config
88
service ssh restart
99
SHELL
1010

0 commit comments

Comments
 (0)