-
Notifications
You must be signed in to change notification settings - Fork 112
60 lines (50 loc) · 1.69 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Tests
on: [push, pull_request]
jobs:
Tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
os:
- centos
- debian
- ubuntu
steps:
- uses: actions/checkout@v2
- name: Set Python Cache Key
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
path: |
bundle
virtualenv
key: Tests-${{ matrix.os }}-${{ env.PY }}-${{ hashFiles('Gemfile', 'test-requirements.txt') }}
- name: Install System Deps
run: |
sudo apt-get update
sudo apt-get install -y curl git python3-pip ruby-dev ruby-bundler shellcheck virtualenv
- name: Install Python Deps
run: |
if [ ! -e virtualenv/bin/activate ]; then /usr/bin/virtualenv -p /usr/bin/python3 virtualenv; fi
. virtualenv/bin/activate
pip3 install -U -r test-requirements.txt
- name: Install Ruby Deps
run: |
/usr/bin/bundle config set --local path 'bundle'
/usr/bin/bundle config set --local without 'vagrant windows'
/usr/bin/bundle install
- name: Install GPG Key
run: |
install -d -m 700 gpgkeys
gpg --no-default-keyring --homedir gpgkeys --import < tests/gpgkeys/test.txt
- name: Test
run: |
. virtualenv/bin/activate
shellcheck lib/kitchen/provisioner/*.sh*
shellcheck assets/*.sh*
LANG=en_US.UTF-8 /usr/bin/bundle exec rake "integration:verify[${{ matrix.os }}]"
/usr/bin/bundle exec kitchen list ${{ matrix.os }}
- name: Cleanup
run: |
/usr/bin/bundle exec rake "integration:destroy[${{ matrix.os }}]"