-
Notifications
You must be signed in to change notification settings - Fork 5
128 lines (126 loc) · 3.1 KB
/
Copy pathcheck.yml
File metadata and controls
128 lines (126 loc) · 3.1 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
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
---
name: Check
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
test:
name: Test (PHP ${{ matrix.php }} on ${{ matrix.os_name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
php:
- '8.2'
- '8.3'
- '8.4'
- '8.5'
include:
- os: ubuntu-latest
os_name: Linux
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup
uses: ./.github/actions/setup
with:
php_version: ${{ matrix.php }}
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Test
run: composer test
lint:
name: Lint (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
php:
- '8.2'
- '8.5'
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup
uses: ./.github/actions/setup
with:
php_version: ${{ matrix.php }}
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Lint
run: composer lint
- name: Lint with ESLint and Prettier
run: npm run lint
build:
name: Build
uses: ./.github/workflows/_build.yml
install:
name: Install (PHP ${{ matrix.php }} on ${{ matrix.os_name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
needs: build
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
php:
- '8.2'
- '8.3'
- '8.4'
- '8.5'
include:
- os: ubuntu-latest
os_name: Linux
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- name: Download artifact
uses: actions/download-artifact@v8
with:
name: ${{ needs.build.outputs.artifact_name }}
path: pkg/
- name: Extract package
run: unzip -q pkg/seam.zip -d package
- name: Create composer.json
uses: DamianReeves/write-file-action@v1.3
with:
write-mode: overwrite
path: composer.json
contents: |
{
"repositories": [
{
"type": "path",
"url": "./package",
"options": { "symlink": false }
}
],
"require": { "seamapi/seam": "*" },
"minimum-stability": "dev"
}
- name: Create main.php
uses: DamianReeves/write-file-action@v1.3
with:
write-mode: overwrite
path: main.php
contents: |
<?php
require __DIR__ . '/vendor/autoload.php';
new Seam\Seam(api_key: 'seam_apikey1_token');
- name: Install
run: composer install --no-interaction --no-progress
- name: Run
run: php main.php