-
Notifications
You must be signed in to change notification settings - Fork 63
82 lines (72 loc) · 2.47 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "Tests"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: [pull_request]
jobs:
build:
name: Build & Unit
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build image
uses: docker/build-push-action@v3
with:
context: .
push: false
load: true
tags: storage-dev
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Start storage
env:
DO_ACCESS_KEY: ${{ secrets.DO_ACCESS_KEY }}
DO_SECRET: ${{ secrets.DO_SECRET }}
LINODE_ACCESS_KEY: ${{ secrets.LINODE_ACCESS_KEY }}
LINODE_SECRET: ${{ secrets.LINODE_SECRET }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET: ${{ secrets.S3_SECRET }}
WASABI_ACCESS_KEY: ${{ secrets.WASABI_ACCESS_KEY }}
WASABI_SECRET: ${{ secrets.WASABI_SECRET }}
BACKBLAZE_ACCESS_KEY: ${{ secrets.BACKBLAZE_ACCESS_KEY }}
BACKBLAZE_SECRET: ${{ secrets.BACKBLAZE_SECRET }}
run: |
docker compose up -d
sleep 10
- name: Doctor
run: |
docker compose logs tests
docker ps
- name: Unit Tests
run: docker compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml --debug --testsuite unit
e2e_test:
name: E2E Test
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
devices: [BackblazeTest, DOSpacesTest, LinodeTest, LocalTest, S3Test, WasabiTest]
steps:
- name: checkout
uses: actions/checkout@v3
- name: Start storage
env:
DO_ACCESS_KEY: ${{ secrets.DO_ACCESS_KEY }}
DO_SECRET: ${{ secrets.DO_SECRET }}
LINODE_ACCESS_KEY: ${{ secrets.LINODE_ACCESS_KEY }}
LINODE_SECRET: ${{ secrets.LINODE_SECRET }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET: ${{ secrets.S3_SECRET }}
WASABI_ACCESS_KEY: ${{ secrets.WASABI_ACCESS_KEY }}
WASABI_SECRET: ${{ secrets.WASABI_SECRET }}
BACKBLAZE_ACCESS_KEY: ${{ secrets.BACKBLAZE_ACCESS_KEY }}
BACKBLAZE_SECRET: ${{ secrets.BACKBLAZE_SECRET }}
run: |
docker compose up -d
sleep 10
- name: Run ${{matrix.devices}}
run: docker compose exec -T tests vendor/bin/phpunit tests/Storage/Device/${{matrix.devices}}.php