-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (58 loc) · 1.53 KB
/
test.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
name: test
on:
workflow_dispatch:
pull_request:
branches: [ master ]
jobs:
test:
environment: test
runs-on: ubuntu-20.04
services:
s3:
image: localstack/localstack:s3-latest
ports:
- 4566:4566
env:
SERVICES: s3
AWS_ACCESS_KEY_ID: testkey
AWS_SECRET_ACCESS_KEY: testsecret
DEFAULT_REGION: us-east-2
steps:
- uses: actions/checkout@v3
- name: Install Python 3.6
uses: actions/setup-python@v4
with:
python-version: 3.6
- name: Create S3 bucket
env:
AWS_ACCESS_KEY_ID: testkey
AWS_SECRET_ACCESS_KEY: testsecret
run: |
aws --endpoint-url=http://localhost:4566 s3 mb s3://testbucket --region us-east-2
- name: Run Flake8
run: |
pip install --upgrade pip
pip install flake8
flake8
- name: Install dependencies
run: |
sudo pip install -r requirements.txt
- name: Install ZFS
run: |
sudo apt-get update
sudo apt-get install -y zfsutils-linux
- name: Create zpool
run: |
truncate --size 1G disk-image
sudo zpool create test-pool \
/home/runner/work/zfs_uploader/zfs_uploader/disk-image
- name: Run test suite
env:
AWS_ACCESS_KEY_ID: testkey
AWS_SECRET_ACCESS_KEY: testsecret
AWS_DEFAULT_REGION: us-east-2
S3_BUCKET: testbucket
ENDPOINT: http://localhost:4566
run: |
python write_test_config.py
sudo python -m unittest -v