Skip to content

Commit fffdd61

Browse files
Add GitHub workflows for test automation
1 parent e8024a6 commit fffdd61

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/main.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-20.04
13+
continue-on-error: true
14+
15+
strategy:
16+
matrix:
17+
include:
18+
- php_version: 7.4
19+
- php_version: 8.0
20+
- php_version: 8.1
21+
- php_version: latest
22+
23+
container:
24+
image: php:${{ matrix.php_version }}
25+
26+
env:
27+
COMPOSER_VERSION: 2
28+
INSTALL_PATH: php-cypher-dsl
29+
REPOSITORY_NAME: php-cypher-dsl
30+
31+
steps:
32+
# https://getcomposer.org/download/
33+
- name: Install Composer
34+
run: |
35+
apt update
36+
apt install -y unzip
37+
php -r "copy('https://getcomposer.org/installer', 'installer');"
38+
php -r "copy('https://composer.github.io/installer.sig', 'expected');"
39+
echo `cat expected` " installer" | sha384sum -c -
40+
php installer --${{ env.COMPOSER_VERSION }}
41+
rm -f installer expected
42+
mv composer.phar /usr/local/bin/composer
43+
44+
- name: Checkout repository
45+
uses: actions/checkout@v2
46+
with:
47+
repository: WikibaseSolutions/${{ env.REPOSITORY_NAME }}
48+
path: ${{ env.REPOSITORY_NAME }}
49+
50+
- name: Install dependencies
51+
run: composer update --working-dir ${{ env.INSTALL_PATH }}
52+
53+
- name: Run unit tests
54+
run: composer test --working-dir ${{ env.INSTALL_PATH }}

0 commit comments

Comments
 (0)