forked from apache/libcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.29 KB
/
integration-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# NOTE: Integration tests are part of a separate workflow so we can re-run just
# this workflow on failure
name: Integration Tests
on:
push:
branches:
- trunk
pull_request:
branches:
- trunk
# schedule:
# - cron: '0 1 * * *'
jobs:
# Special job which skips duplicate jobs
pre_job:
name: Skip Duplicate Jobs Pre Job
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- name: Checkout code
uses: actions/checkout@master
with:
persist-credentials: false
submodules: recursive
- id: skip_check
# NOTE: We store action as submodule since ASF doesn't allow directly referencing external
# actions
uses: ./.github/actions/skip-duplicate-actions # v3.4.0
with:
github_token: ${{ github.token }}
integration_tests:
name: Run Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 15
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip == 'false' || github.ref == 'refs/heads/trunk' }}
strategy:
matrix:
python_version: [3.8]
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Use Python ${{ matrix.python_version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Install OS / deb dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq gcc libvirt-dev
- name: Cache Python Dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-tests.txt', 'integration/storage/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python Dependencies
run: |
pip install "tox==3.24.4"
- name: Run tox target
run: |
script -e -c "tox -e integration-storage"
env:
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }}