Repository navigation
55 lines (55 loc) · 1.93 KB
/
Copy pathci.yml
File metadata and controls
55 lines (55 loc) · 1.93 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
name: Go tests (Linux, Windows, macOS)
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-latest, macos-15-intel]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: '1.27.3'
cache: false
- name: Unit and integration fixture tests
run: go test ./...
- name: Static check
run: go vet ./...
- name: Native build smoke
run: go run ./cmd/php2shell doctor
- name: Release documentation consistency
shell: bash
run: bash scripts/check-release-docs.sh
- name: IIS W3C log smoke (portable fixture)
shell: bash
run: |
echo '#Fields: date time cs-method cs-uri-stem cs-uri-query sc-status' > iis-fixture.log
echo '2026-10-21 12:00:00 POST /upload.php - 200' >> iis-fixture.log
go run ./cmd/php2shell scan --access-log iis-fixture.log --out reports/ci-smoke.html
test -s reports/ci-smoke.html
test -s reports/ci-smoke.csv
test ! -e reports/ci-smoke.json
head -1 reports/ci-smoke.csv | grep -q schema_version
legacy-windows-build:
name: Windows legacy (Go 1.20) cross-build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- name: Build php2shell-windows-legacy-amd64.exe
shell: bash
run: |
set -euo pipefail
sudo apt-get update -qq && sudo apt-get install -y -qq zip >/dev/null
bash scripts/build-windows-legacy.sh
test -s dist/php2shell-windows-legacy-amd64.exe
test -s dist/php2shell-windows-legacy-amd64.zip
# PE header sanity (MZ); runtime on Server 2012 R2 is a field checklist, not CI
xxd -l 2 dist/php2shell-windows-legacy-amd64.exe | grep -q '4d5a'