-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge asfpostrun into asfrun; add unit tests
- Loading branch information
Showing
20 changed files
with
291 additions
and
86 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,35 @@ | ||
name: Unit test postrun update | ||
on: | ||
push: | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# Not sure it's worth testing on multiple Pythons | ||
python-version: [3.8] | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
persist-credentials: false | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pelican[Markdown]==4.5.4 | ||
pip install -r requirements.txt | ||
pip install 'MarkupSafe<2.1.0' # needed for Pelican 4.5.4 | ||
- name: Run test | ||
run: | | ||
cd tests/postrun | ||
bash runtest.sh |
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
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
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
This file was deleted.
Oops, something went wrong.
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
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,3 @@ | ||
title: Dummy | ||
|
||
Dummy file |
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,52 @@ | ||
|
||
# Basic information about the site. | ||
SITENAME = 'Apache Software Foundation' | ||
SITEDESC = 'Test run command' | ||
SITEDOMAIN = 'test.apache.org' | ||
SITEURL = 'https://test.apache.org' | ||
SITELOGO = 'https://test.apache.org/None' | ||
SITEREPOSITORY = 'None' | ||
CURRENTYEAR = 2023 | ||
TRADEMARKS = 'Apache, the Apache feather logo are trademarks' | ||
TIMEZONE = 'UTC' | ||
# Theme includes templates and possibly static files | ||
THEME = './theme/apache' | ||
# Specify location of plugins, and which to use | ||
PLUGIN_PATHS = [ '/private/var/sebb/git/infra/pelican/bin/../plugins', ] | ||
PLUGINS = [ 'gfm', 'asfrun', ] | ||
# All content is located at '.' (aka content/ ) | ||
PAGE_PATHS = [ '.' ] | ||
STATIC_PATHS = [ '.', ] | ||
# Where to place/link generated pages | ||
|
||
PATH_METADATA = '(?P<path_no_ext>.*)\\..*' | ||
|
||
PAGE_SAVE_AS = '{path_no_ext}.html' | ||
# Don't try to translate | ||
PAGE_TRANSLATION_ID = None | ||
# Disable unused Pelican features | ||
# N.B. These features are currently unsupported, see https://github.com/apache/infrastructure-pelican/issues/49 | ||
FEED_ALL_ATOM = None | ||
INDEX_SAVE_AS = '' | ||
TAGS_SAVE_AS = '' | ||
CATEGORIES_SAVE_AS = '' | ||
AUTHORS_SAVE_AS = '' | ||
ARCHIVES_SAVE_AS = '' | ||
# Disable articles by pointing to a (should-be-absent) subdir | ||
ARTICLE_PATHS = [ 'blog' ] | ||
# needed to create blogs page | ||
ARTICLE_URL = 'blog/{slug}.html' | ||
ARTICLE_SAVE_AS = 'blog/{slug}.html' | ||
# Disable all processing of .html files | ||
READERS = { 'html': None, } | ||
|
||
|
||
|
||
|
||
|
||
# Configure the asfrun plugin (finalization) | ||
ASF_POSTRUN = [ '/bin/bash postrun.sh', ] | ||
|
||
|
||
|
||
|
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,15 @@ | ||
site: | ||
name: Apache Software Foundation | ||
domain: test.apache.org | ||
logo: None | ||
repository: None | ||
description: Test run command | ||
trademarks: Apache, the Apache feather logo are trademarks | ||
|
||
theme: theme/apache | ||
|
||
plugins: [] | ||
|
||
setup: | ||
postrun: | ||
- /bin/bash postrun.sh |
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,15 @@ | ||
site: | ||
name: Apache Software Foundation | ||
domain: test.apache.org | ||
logo: None | ||
repository: None | ||
description: Test run command | ||
trademarks: Apache, the Apache feather logo are trademarks | ||
|
||
theme: theme/apache | ||
|
||
plugins: [] | ||
|
||
setup: | ||
run: | ||
- /bin/bash run.sh |
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,15 @@ | ||
site: | ||
name: Apache Software Foundation | ||
domain: test.apache.org | ||
logo: None | ||
repository: None | ||
description: Test run command | ||
trademarks: Apache, the Apache feather logo are trademarks | ||
|
||
theme: theme/apache | ||
|
||
plugins: [] | ||
|
||
setup: | ||
postrun: | ||
- /bin/bash postrun.sh |
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,17 @@ | ||
site: | ||
name: Apache Software Foundation | ||
domain: test.apache.org | ||
logo: None | ||
repository: None | ||
description: Test run command | ||
trademarks: Apache, the Apache feather logo are trademarks | ||
|
||
theme: theme/apache | ||
|
||
plugins: [] | ||
|
||
setup: | ||
run: | ||
- /bin/bash run.sh | ||
postrun: | ||
- /bin/bash postrun.sh |
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,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Script to test postrun command | ||
|
||
cd temp | ||
cp date2.txt date2.tmp | ||
|
||
if [ -z "$PELICAN_OUTPUT_PATH" ] | ||
then | ||
echo "PELICAN_OUTPUT_PATH is not defined!" | ||
exit 1 | ||
fi |
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Script to test run command | ||
|
||
cd temp | ||
cp date1.txt date1.tmp |
Oops, something went wrong.