-
Notifications
You must be signed in to change notification settings - Fork 15
76 lines (61 loc) · 2.06 KB
/
phpunit.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
name: PHPUnit
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
php: ['7.4', '8.0']
experimental: [false]
include:
- php: '8.1'
experimental: true
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: pecl
extensions: xdebug
- name: Configure for PHP 8.1
run: composer config platform.php 8.0.99
if: matrix.php == '8.1'
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Create env
run: touch .env
- name: Run test suite
run: php vendor/bin/phpunit
- uses: codecov/codecov-action@v3
with:
file: ./clover.xml
- name: Download box
run: wget https://github.com/humbug/box/releases/download/3.13.0/box.phar
- name: Remove dev deps
run: composer install --no-dev
- name: Build phar
run: php box.phar compile
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: frosh-plugin-upload.zip
path: frosh-plugin-upload.phar
dockerUpload:
runs-on: ubuntu-latest
needs: [build]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Login into Docker Registery
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build image and push
run: |
docker build -t friendsofshopware/plugin-uploader:master .
docker build -t ghcr.io/friendsofshopware/plugin-uploader:master .
docker push friendsofshopware/plugin-uploader:master
docker push ghcr.io/friendsofshopware/plugin-uploader:master