-
Notifications
You must be signed in to change notification settings - Fork 7
129 lines (122 loc) · 4.15 KB
/
oxrun.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: oxrun ci
on: ["push"] # "pull_request"
jobs:
stand_alone_checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Validate composer.json
run: composer validate
- name: validate php syntax
run: find . -not -path "./vendor/*" -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
tests:
needs: stand_alone_checks
strategy:
matrix:
oxid:
- metapackage: "6.5"
php: "8.0"
- metapackage: "6.3"
php: "8.0"
- metapackage: "6.2"
php: "7.4"
runs-on: ubuntu-latest
container:
image: oxidesales/oxideshop-docker-php:${{matrix.oxid.php}}
env:
COMPILATION_VERSION: dev-b-${{matrix.oxid.metapackage}}-ce
DOCKER_DOCUMENT_ROOT: /var/www/oxid-esale
MYSQL_HOST: oxid_db
MYSQL_DATABASE: 'oxid'
MYSQL_USER: "oxid"
MYSQL_PASSWORD: "oxid"
OXID_SHOP_URL: "http://localhost"
services:
oxid_db:
image: mysql:5.7
env:
MYSQL_DATABASE: oxid
MYSQL_USER: oxid
MYSQL_PASSWORD: oxid
MYSQL_ROOT_PASSWORD: oxid
TZ: Europe/Berlin
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v1
- name: Setup Oxid eSale
run: bash ./docker/bin/installOxid.sh
- name: PHPUnit
run: ./vendor/bin/phpunit --debug --stop-on-error --stop-on-failure
- name: run oe-console
run: ${DOCKER_DOCUMENT_ROOT}/vendor/bin/oe-console
- name: run oxrun-light
run: ${DOCKER_DOCUMENT_ROOT}/vendor/bin/oxrun-light
- name: save coverage report
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: build/logs/clover.xml
retention-days: 1
- name: create new readme
run: |
rm -Rf ${DOCKER_DOCUMENT_ROOT}/source/tmp/*
rm -Rf ${GITHUB_WORKSPACE}/vendor
bash ./docker/bin/updateReadmeDoc.sh "${DOCKER_DOCUMENT_ROOT}/vendor/bin/oxrun-light"
- name: save oxrun-description
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/upload-artifact@v2
with:
name: oxrun-description
path: README.md
retention-days: 1
finish-code-coverage:
if: ${{ github.ref == 'refs/heads/master' }}
needs: tests
runs-on: ubuntu-latest
container:
image: composer:latest
steps:
- uses: actions/checkout@v1
- name: download coverage report
uses: actions/download-artifact@v2
with:
name: code-coverage-report
- name: remove artifact coverage report
uses: geekyeggo/delete-artifact@v1
with:
name: code-coverage-report
- name: Install Coveralls
run: composer global require php-coveralls/php-coveralls
- name: Coveralls Finished
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p ./build/logs/
mv ./clover.xml ./build/logs/
${COMPOSER_HOME}/vendor/bin/php-coveralls -v
finish-reademe:
if: ${{ github.ref == 'refs/heads/master' }}
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: download oxrun-description
uses: actions/download-artifact@v2
with:
name: oxrun-description
- name: remove artifact oxrun-description
uses: geekyeggo/delete-artifact@v1
with:
name: oxrun-description
- name: commit readme
continue-on-error: true
run: |
git config --global user.name "Github Action"
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add ${GITHUB_WORKSPACE}/README.md
git commit --message "Updated commands docu in README.md. (#$GITHUB_RUN_NUMBER) [ci skip]"
git push -u origin HEAD:${{ github.ref }}