-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (48 loc) · 1.46 KB
/
php.yml
File metadata and controls
59 lines (48 loc) · 1.46 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
name: PHP Composer
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
environment: tests
steps:
- uses: actions/checkout@v3
- name: Validate composer.json and composer.lock
run: composer validate
working-directory: examples
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Delete vendor obliterating permissions
run: rm -Rf vendor
working-directory: examples
- name: Install dependencies
run: composer install --prefer-dist --no-progress
working-directory: examples
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Test Env
shell: bash
run: |
echo "$TEST_ID_TESTNET"
echo "$TEST_ID_IPFS"
echo "$TEST"
env:
TEST_ID_TESTNET: ${{ secrets.PROJECT_ID_TESTNET }}
TEST_ID_IPFS: ${{ secrets.PROJECT_ID_IPFS }}
TEST: test
- name: Run test suite
run: composer run-script test
working-directory: examples
env:
TEST_ID_TESTNET: ${{ secrets.PROJECT_ID_TESTNET }}
TEST_ID_IPFS: ${{ secrets.PROJECT_ID_IPFS }}
TEST: test