This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
65 lines (64 loc) · 2.54 KB
/
streisand.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
61
62
63
64
65
---
name: Streisand
on: [push, pull_request]
jobs:
deps:
name: Dependencies
runs-on: ubuntu-16.04
env:
ANSIBLE_CONFIG: tests/ansible.cfg
ANSIBLE_NOCOWS: true
#ANSIBLE_VERBOSITY: 5
DEBIAN_FRONTEND: noninteractive
strategy:
#max-parallel: 5
fail-fast: false
matrix:
# 3.5 for older distro's like xenial, and 3.8 to test the latest python
python-version: [3.5, 3.8]
# Test ansible 2.8 and "latest"
ansible-version: [">=2.8,<2.9", ">=2.9"]
env_vars:
- {RUN: "shellcheck yamlcheck syntax ci", SITE: "global_vars/default-site.yml"}
- {RUN: "ci", SITE: "tests/site_vars/openconnect.yml"}
- {RUN: "ci", SITE: "tests/site_vars/openvpn.yml"}
- {RUN: "ci", SITE: "tests/site_vars/shadowsocks.yml"}
- {RUN: "ci", SITE: "tests/site_vars/ssh.yml"}
- {RUN: "ci", SITE: "random"}
steps:
# Removing dotnetdev.list, and microsoft-prod.list for now, as they seem to constantly have issues
# with multiple github issues being opened in response. Removing shellcheck so we can install
# a newer version from snap.
- name: Remove apt lists and packages we dont need
run: |
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo apt-get update -qq
sudo apt-get purge -yqq shellcheck
sudo dpkg -l linux-{image,headers}-* | awk '/^ii/{print $2}' | egrep '[0-9]+\.[0-9]+\.[0-9]+' | grep -v $(uname -r | cut -d- -f-2) | xargs sudo apt-get -yqq purge
sudo apt-get --purge autoremove -yqq
- name: Update Yarn Debian key
run: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- name: Install additonal deps
run: |
sudo apt-get install ca-certificates
sudo snap install --channel=edge shellcheck
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
fetch-depth: 1
python-version: ${{ matrix.python-version }}
- name: Install additional pip dependencies
run: |
python -m pip install --upgrade pip
pip install "ansible${{ matrix.ansible-version }}"
pip install urllib3 yamllint
ansible --version
- name: Run tests
env: ${{ matrix.env_vars }}
run: ./tests/tests.sh