-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (50 loc) · 1.34 KB
/
ci.yaml
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
name: Continuous integration
on: [push, pull_request]
jobs:
cs:
name: Check code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ramsey/composer-install@v2
- name: Test code style
run: vendor/bin/ecs
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1']
steps:
- uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: pecl, phpstan
coverage: pcov
extensions: mbstring, curl, json, pdo-sqlite
- uses: ramsey/composer-install@v2
- name: Static analysis
run: phpstan
- name: Run tests
run: composer test -- --coverage-xml
release:
if: github.ref == 'refs/heads/master'
name: Automated release
needs: [test, cs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: >
npx
-p "@semantic-release/commit-analyzer"
-p "@semantic-release/release-notes-generator"
-p conventional-changelog-conventionalcommits
-p semantic-release
-- semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}