-
-
Notifications
You must be signed in to change notification settings - Fork 177
83 lines (79 loc) · 2.54 KB
/
build.yml
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
name: build
on: [push, pull_request]
env:
FORCE_COLOR: 3
jobs:
test:
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Latest versions
- xdebug: xdebug-3.2.1 # renovate:keep-up-to-date
php: '8.2' # renovate:keep-up-to-date
os: ubuntu-22.04
- xdebug: xdebug-3.1.3 # renovate:keep-up-to-date
php: '8.1' # renovate:keep-up-to-date
os: windows-2022
- xdebug: xdebug-3.2.1 # renovate:keep-up-to-date
php: '8.2' # renovate:keep-up-to-date
os: macos-12
# Old versions
- xdebug: xdebug-2.9.8
php: '7.4'
os: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.14.2' # renovate:keep-up-to-date
- name: Install npm dependencies
run: npm ci
- name: Prettier
run: npm run prettier-check
- name: Lint
run: npm run eslint
- name: Build VS Code extension
run: npm run build
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.xdebug }}
# Top: Xdebug v3
# Bottom: Xdebug v2
ini-values: >-
xdebug.mode = debug,
xdebug.start_with_request = yes,
xdebug.remote_enable = 1,
xdebug.remote_autostart = 1,
xdebug.remote_port = 9003,
xdebug.remote_log = /tmp/xdebug.log
- name: Run tests
run: npm run cover
- name: Generate coverage report
run: ./node_modules/.bin/nyc report --reporter=json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
release:
runs-on: ubuntu-22.04
needs: test
if: github.repository_owner == 'xdebug' && github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.14.2' # renovate:keep-up-to-date
- name: Install npm dependencies
run: npm ci
- name: Build VS Code extension
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npm run semantic-release