Skip to content

Commit f6f21e9

Browse files
committed
⭐⚔️ Do, or do not. There is WPry.
0 parents  commit f6f21e9

148 files changed

Lines changed: 22403 additions & 0 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[testdata/plugin-cr-only.php]
4+
end_of_line = cr
5+
6+
[testdata/theme-cr-only.css]
7+
end_of_line = cr
8+
9+
[testdata/plugin-crlf.php]
10+
end_of_line = crlf
11+
12+
[testdata/theme-crlf.css]
13+
end_of_line = crlf

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
* text=auto eol=lf
2+
3+
# CR-only test fixtures: no line ending conversion
4+
testdata/plugin-cr-only.php -text
5+
testdata/theme-cr-only.css -text
6+
7+
# CRLF test fixtures: enforce CRLF line endings
8+
testdata/plugin-crlf.php text eol=crlf
9+
testdata/theme-crlf.css text eol=crlf

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: gomod
5+
directory: /
6+
schedule:
7+
interval: daily
8+
cooldown:
9+
default-days: 3
10+
11+
- package-ecosystem: docker
12+
directories:
13+
- /
14+
- /e2e/scripts/
15+
schedule:
16+
interval: daily
17+
cooldown:
18+
default-days: 3
19+
20+
- package-ecosystem: github-actions
21+
directory: /
22+
schedule:
23+
interval: daily
24+
cooldown:
25+
default-days: 3

.github/workflows/audit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Audit
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '11 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+
govulncheck:
23+
uses: typisttech/.github/.github/workflows/audit-go.yml@872d5345c254c6f8d65f318e5bffa74d7d0192e2 # v5.0.1
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@872d5345c254c6f8d65f318e5bffa74d7d0192e2 # v5.0.1
19+
with:
20+
minor: true
21+
patch: true

.github/workflows/go-proxy.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Go Proxy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "*"
9+
10+
permissions: {}
11+
12+
jobs:
13+
go:
14+
uses: typisttech/.github/.github/workflows/go-proxy.yml@872d5345c254c6f8d65f318e5bffa74d7d0192e2 # v5.0.1

.github/workflows/lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
actions:
21+
uses: typisttech/.github/.github/workflows/lint-actions.yml@872d5345c254c6f8d65f318e5bffa74d7d0192e2 # v5.0.1
22+
23+
go:
24+
uses: typisttech/.github/.github/workflows/lint-go.yml@872d5345c254c6f8d65f318e5bffa74d7d0192e2 # v5.0.1
25+
with:
26+
golangci-lint: true
27+
golangci-lint-version: v2.11 # Must be kept in sync with @../../mise.toml
28+
29+
wait-for-all-lint:
30+
needs:
31+
- actions
32+
- go
33+
runs-on: ubuntu-latest
34+
steps:
35+
- run: exit 0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
contents: write
15+
pull-requests: read
16+
17+
jobs:
18+
release-drafter:
19+
uses: typisttech/.github/.github/workflows/release-drafter.yml@872d5345c254c6f8d65f318e5bffa74d7d0192e2 # v5.0.1

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
release-drafter:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: read
14+
steps:
15+
- uses: release-drafter/release-drafter@5de93583980a40bd78603b6dfdcda5b4df377b32 # v7.2.0
16+
with:
17+
tag: ${{ github.ref_name }}
18+
19+
goreleaser:
20+
runs-on: ubuntu-latest
21+
needs:
22+
- release-drafter
23+
permissions:
24+
# For GoReleaser
25+
contents: write
26+
# For actions/attest
27+
id-token: write
28+
attestations: write
29+
artifact-metadata: write
30+
steps:
31+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32+
with:
33+
fetch-depth: 0
34+
persist-credentials: false
35+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
36+
with:
37+
go-version: stable
38+
39+
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
40+
id: app-token
41+
with:
42+
client-id: ${{ vars.TASTENDRUCK_CLIENT_ID }}
43+
private-key: ${{ secrets.TASTENDRUCK_PRIVATE_KEY }}
44+
owner: ${{ github.repository_owner }}
45+
repositories: homebrew-tap
46+
permission-contents: write
47+
permission-pull-requests: write
48+
49+
- uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
50+
with:
51+
version: "~> v2"
52+
args: release --clean
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
GORELEASER_HOMEBREW_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
56+
57+
- uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
58+
with:
59+
subject-checksums: ./dist/checksums.txt
60+
61+
- uses: cloudsmith-io/cloudsmith-cli-action@18665afcce9f859312b61989671af9af7402e4fb # v2.0.2
62+
with:
63+
api-key: ${{ secrets.CLOUDSMITH_API_KEY_TASTENDRUCK }}
64+
- run: echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
65+
env:
66+
TAG: ${{ github.ref_name }}
67+
- run: cloudsmith push deb typisttech/oss/any-distro/any-version "dist/wpry_${VERSION}_linux_amd64.deb"
68+
- run: cloudsmith push deb typisttech/oss/any-distro/any-version "dist/wpry_${VERSION}_linux_arm64.deb"
69+
- run: cloudsmith push alpine typisttech/oss/alpine/any-version "dist/wpry_${VERSION}_linux_amd64.apk"
70+
- run: cloudsmith push alpine typisttech/oss/alpine/any-version "dist/wpry_${VERSION}_linux_arm64.apk"

.github/workflows/test.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Test
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+
test:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
27+
with:
28+
go-version-file: 'go.mod'
29+
30+
- run: go test -count=1 -race -shuffle=on -coverprofile=coverage.out -covermode=atomic ./...
31+
- run: go test -count=1 -shuffle=on -run "_Racing$" ./...
32+
33+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
34+
with:
35+
name: coverage
36+
path: coverage.out
37+
if-no-files-found: error
38+
39+
codecov:
40+
needs: test
41+
runs-on: ubuntu-latest
42+
permissions:
43+
contents: read
44+
id-token: write
45+
steps:
46+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47+
with:
48+
persist-credentials: false
49+
50+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
51+
with:
52+
name: coverage
53+
54+
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
55+
with:
56+
use_oidc: true
57+
fail_ci_if_error: true
58+
disable_search: true
59+
files: coverage.out

0 commit comments

Comments
 (0)