-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (56 loc) · 1.79 KB
/
code_tests.yml
File metadata and controls
70 lines (56 loc) · 1.79 KB
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
name: "Code tests 🚀"
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
FORCE_COLOR: true
TERM: xterm-256color
PHP_VERSION: '8.4'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup the environment
run: |
TMP_COMPOSER_VERSION='2.8.6'
echo "COMPOSER_VERSION=${TMP_COMPOSER_VERSION}"
echo "COMPOSER_VERSION=${TMP_COMPOSER_VERSION}" >> $GITHUB_ENV
- name: Populate composer_auth
run: |
cat > /tmp/composer_auth <<EOF
'{
"github-oauth": {
"github.com": "${{ secrets.GITHUB_TOKEN }}"
}
}'
EOF
TMP_COMPOSER_AUTH="$(echo `cat /tmp/composer_auth | sed s/\'//g`)"
echo "COMPOSER_AUTH<<EOF" >> $GITHUB_ENV
echo "$TMP_COMPOSER_AUTH" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Setup PHP with Composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
tools: "composer:${{ env.COMPOSER_VERSION }}"
- name: CheckOut Source Code
uses: actions/checkout@v3
continue-on-error: true
with:
ref: main
fetch-depth: 0
persist-credentials: true
set-safe-directory: true
submodules: 'recursive'
clean: true
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Composer install
run: composer install --ansi --verbose
- name: Running PHPUnit Tests
run: composer run-tests
# - name: Runnning PHPUnit tests
# uses: php-actions/phpunit@v4