-
-
Notifications
You must be signed in to change notification settings - Fork 907
65 lines (63 loc) · 2.48 KB
/
test.yml
File metadata and controls
65 lines (63 loc) · 2.48 KB
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: Test
on: [push, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10-dev']
env:
cache-revision: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Cache minio
id: cache-minio
uses: actions/cache@v2
env:
cache-name: cache-minio
with:
path: ~/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.cache-revision }}
- name: Cache certgen
id: cache-certgen
uses: actions/cache@v2
env:
cache-name: cache-certgen
with:
path: ~/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.cache-revision }}
- name: Download minio and certgen on cache miss
if: steps.cache-minio.outputs.cache-hit != 'true' || steps.cache-certgen.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache
test ! -e ~/cache/minio && wget -O ~/cache/minio https://dl.minio.io/server/minio/release/linux-amd64/minio || echo "Minio already in cache"
test ! -e ~/cache/certgen && wget -O ~/cache/certgen https://github.com/minio/certgen/releases/download/v0.0.2/certgen-linux-amd64 || echo "Certgen already in cache"
- name: Start a local instance of minio
run: |
export AWS_ACCESS_KEY_ID=Q3AM3UQ867SPQQA43P2F
export AWS_SECRET_ACCESS_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
export MINIO_ROOT_USER=Q3AM3UQ867SPQQA43P2F
export MINIO_ROOT_PASSWORD=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
chmod +x ~/cache/minio
chmod +x ~/cache/certgen
mkdir -p ~/minio_tmp
mkdir -p ~/.minio/certs
cd ~/.minio/certs
~/cache/certgen -ca -host "localhost,127.0.0.1,172.17.0.1"
~/cache/minio server ~/minio_tmp &
sleep 4 # give minio some time to start
- name: Run tests
## Tests stopped at test 23 because minio doesn't support "quote_plus" used in signatures.
run: python ./run-tests-minio.py -c .ci.s3cfg -p baseauto
- name: Terminate
if: always()
continue-on-error: true
run: killall minio