Skip to content

Commit 3677ed1

Browse files
committed
🔚🔚🔚 Always be closing
-- [Glengarry Glen Ross (1992)](https://www.imdb.com/title/tt0104348/quotes/) Rebased for clean git history. Originally started in late 2024.
0 parents  commit 3677ed1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+7808
-0
lines changed

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
# Ignore everything.
4+
/* export-ignore
5+
6+
# Export white-listed production code only.
7+
/src -export-ignore
8+
/composer.json -export-ignore
9+
/composer.lock -export-ignore
10+
/LICENSE -export-ignore
11+
/README.md -export-ignore

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: composer
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
- package-ecosystem: gomod
9+
directory: /
10+
schedule:
11+
interval: weekly
12+
- package-ecosystem: github-actions
13+
directory: /
14+
schedule:
15+
interval: weekly

.github/release-drafter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_extends: .github

.github/workflows/audit.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Audit
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '16 3 * * 1' # Weekly on Monday
7+
pull_request:
8+
branches:
9+
- main
10+
push:
11+
branches:
12+
- main
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref_name }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
php:
23+
uses: typisttech/.github/.github/workflows/audit-php.yml@v3
24+
25+
go:
26+
uses: typisttech/.github/.github/workflows/audit-go.yml@v3
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Dependabot Auto-merge
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
jobs:
17+
dependabot:
18+
uses: typisttech/.github/.github/workflows/dependabot-auto-merge.yml@v3
19+
with:
20+
minor: true
21+
patch: true

.github/workflows/format.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Format
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref_name }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
php:
19+
uses: typisttech/.github/.github/workflows/format-php.yml@v3
20+
secrets: inherit

.github/workflows/lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
php:
21+
uses: typisttech/.github/.github/workflows/lint-php.yml@v3
22+
23+
go:
24+
uses: typisttech/.github/.github/workflows/lint-go.yml@v3
25+
26+
wait-for-all-lint:
27+
needs:
28+
- php
29+
- go
30+
runs-on: ubuntu-latest
31+
steps:
32+
- run: exit 0
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Drafter
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref_name }}
11+
cancel-in-progress: true
12+
13+
permissions: {}
14+
15+
jobs:
16+
release-drafter:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: read
21+
steps:
22+
- uses: release-drafter/release-drafter@v6
23+
env:
24+
GITHUB_TOKEN: ${{ github.token }} # Not a typo.

.github/workflows/test.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: Test
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
11+
tags:
12+
- '**'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
permissions: {}
19+
20+
jobs:
21+
php-matrix:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
versions: ${{ steps.php-matrix.outputs.versions }}
25+
highest: ${{ steps.php-matrix.outputs.highest }}
26+
steps:
27+
- uses: actions/checkout@v5
28+
with:
29+
sparse-checkout: composer.json
30+
sparse-checkout-cone-mode: false
31+
32+
- uses: typisttech/php-matrix-action@v2
33+
id: php-matrix
34+
35+
pest:
36+
needs: php-matrix
37+
strategy:
38+
matrix:
39+
php-version: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
40+
coverage: ['none']
41+
exclude:
42+
- php-version: ${{ needs.php-matrix.outputs.highest }}
43+
coverage: 'none'
44+
include:
45+
- php-version: ${{ needs.php-matrix.outputs.highest }}
46+
coverage: xdebug
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v5
50+
51+
- uses: shivammathur/setup-php@v2
52+
with:
53+
php-version: ${{ matrix.php-version }}
54+
coverage: ${{ matrix.coverage }}
55+
56+
- uses: ramsey/composer-install@v3
57+
58+
- run: composer pest:unit -- ${COVERAGE} --ci
59+
env:
60+
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }}
61+
- run: composer pest:feature -- ${COVERAGE} --ci
62+
env:
63+
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }}
64+
65+
- uses: actions/upload-artifact@v4
66+
if: matrix.coverage == 'xdebug'
67+
with:
68+
name: coverage
69+
path: coverage-*.xml
70+
71+
codecov:
72+
needs: pest
73+
runs-on: ubuntu-latest
74+
permissions:
75+
id-token: write
76+
steps:
77+
- uses: actions/checkout@v5
78+
79+
- uses: actions/download-artifact@v5
80+
with:
81+
name: coverage
82+
83+
- uses: codecov/codecov-action@v5
84+
with:
85+
use_oidc: true
86+
fail_ci_if_error: true
87+
disable_search: true
88+
files: coverage-unit.xml
89+
flags: unit
90+
91+
- uses: codecov/codecov-action@v5
92+
with:
93+
use_oidc: true
94+
fail_ci_if_error: true
95+
disable_search: true
96+
files: coverage-feature.xml
97+
flags: feature
98+
99+
e2e:
100+
name: e2e (PHP ${{ matrix.php-version }}, Composer ${{ matrix.composer-version }})
101+
needs: php-matrix
102+
strategy:
103+
matrix:
104+
php-version: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
105+
composer-version: ['2.6', '2.7', '2.8']
106+
runs-on: ubuntu-latest
107+
env:
108+
GOFLAGS: '-mod=mod'
109+
steps:
110+
- run: sudo apt-get update
111+
- run: sudo apt-get install --no-install-recommends --yes subversion
112+
113+
- uses: actions/checkout@v5
114+
115+
- uses: shivammathur/setup-php@v2
116+
with:
117+
php-version: ${{ matrix.php-version }}
118+
tools: composer:${{ matrix.composer-version }}
119+
coverage: 'none'
120+
121+
- uses: actions/setup-go@v6
122+
with:
123+
go-version-file: 'go.mod'
124+
125+
- run: go test -count=1 ./...
126+
127+
wait-for-all-tests:
128+
needs:
129+
- pest
130+
- e2e
131+
runs-on: ubuntu-latest
132+
steps:
133+
- run: exit 0

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Composer
2+
/vendor
3+
4+
# Pest
5+
/coverage*.xml

0 commit comments

Comments
 (0)