-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make GitHub Actions smoke-test
Caddyfile.generate
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- /tmp/tmpcdry5mph 2024-04-21 19:36:45.813805199 +0200 | ||
+++ Caddyfile 2024-04-21 19:36:45.813805199 +0200 | ||
@@ -0,0 +1,27 @@ | ||
+# NOTE: This file has been generated, do not edit | ||
+(common) { | ||
+ encode zstd gzip | ||
+ log { | ||
+ output stdout | ||
+ } | ||
+} | ||
+ | ||
+example.org { | ||
+ import common | ||
+ reverse_proxy example-org:80 | ||
+} | ||
+ | ||
+example.net { | ||
+ import common | ||
+ redir https://example.org{uri} | ||
+} | ||
+ | ||
+www.example.net { | ||
+ import common | ||
+ redir https://example.org{uri} | ||
+} | ||
+ | ||
+www.example.org { | ||
+ import common | ||
+ redir https://example.org{uri} | ||
+} | ||
|
||
changed=yes comment='Caddyfile changed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (c) 2024 Sebastian Pipping <[email protected]> | ||
# Licensed under GNU Affero GPL v3 or later | ||
|
||
name: Run smoke test | ||
|
||
# Drop permissions to minimum for security | ||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
push: | ||
schedule: | ||
- cron: '0 16 * * 5' # Every Friday 4pm | ||
workflow_dispatch: | ||
|
||
jobs: | ||
smoke_test: | ||
name: Run the test suite | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.12] # no particular need for in-between versions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run smoke test | ||
run: | | ||
set -x | ||
python3 --version | ||
./Caddyfile.generate --config sites.cfg.EXAMPLE --saltstack > actual-output.txt | ||
diff -u0 \ | ||
<(tail -n +3 .github/workflows/expected-output.txt) \ | ||
<(tail -n +3 actual-output.txt) |