Skip to content

Bump markdown from 3.8.1 to 3.10.2 #225

Bump markdown from 3.8.1 to 3.10.2

Bump markdown from 3.8.1 to 3.10.2 #225

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: Test the Pelican build action
on:
push:
paths:
- 'pelican/**'
- '.github/workflows/pelican-action-test.yml'
# N.B. Cannot easily test pull_request: because the source may not have rights to create/update the test-site
workflow_dispatch:
permissions:
contents: write
jobs:
pelican-test:
env: # source and target branches
SOURCE: testsite
TARGET: testsite-${{ github.ref_name }} # each branch has its own test output
runs-on: ubuntu-latest
concurrency: # target must not be updated by two jobs at once
group: testsite-${{ github.ref_name }} # must agree with TARGET
steps:
- name: Checkout the test site
uses: actions/checkout@v6
with:
ref: ${{ env.SOURCE }}
- name: Ignore the action checkout
run: |
echo "self/" >> .git/info/exclude
- name: Checkout self
uses: actions/checkout@v6
with:
path: self
- name: Reset output directory ${{ env.TARGET }}
run: |
set +e
echo $TARGET
git branch -D $TARGET
git push origin --delete $TARGET
git branch -a | grep ${{ env.TARGET }}
true
- name: Should create ${{ env.TARGET }}
uses: ./self/pelican
with:
destination: ${{ env.TARGET }}
gfm: 'true'
# fatal: 'errors' (default)
env:
UNIT_TEST_A: This is UNIT_TEST_A
- name: Check ${{ env.TARGET }} was created
run: |
git checkout ${{ env.TARGET }}
{
echo "Commit build products"
echo -n "Initialise empty site"
} >/tmp/expected
cat <<EOD
Commit build products
Initialise empty site
EOD
diff <(git log --pretty="format:%s") /tmp/expected
# Check that GFM was used
grep '<p><del>Hi</del> Hello, <del>there</del> world!</p>' output/index.html
- name: Reset workspace for next test
run: |
git checkout ${{ env.SOURCE }}
git status
- name: Should update ${{ env.TARGET }} again
uses: ./self/pelican
with:
destination: ${{ env.TARGET }}
gfm: 'true'
fatal: 'warnings'
env: # This is a different value
UNIT_TEST_A: This is UNIT_TEST_A updated
- name: Check ${{ env.TARGET }} is present and has been updated
run: |
git checkout ${{ env.TARGET }}
{
echo "Commit build products"
echo "Commit build products"
echo -n "Initialise empty site"
} >/tmp/expected
diff <(git log --pretty="format:%s") /tmp/expected
# Check that GFM was used
grep '<p><del>Hi</del> Hello, <del>there</del> world!</p>' output/index.html
- name: Reset workspace for next test
run: |
git checkout ${{ env.SOURCE }}
git status
- name: Should not update ${{ env.TARGET }} this time
uses: ./self/pelican
with:
destination: ${{ env.TARGET }}
gfm: 'true'
fatal: '' # should ignore it
env: # This is the same value
UNIT_TEST_A: This is UNIT_TEST_A updated
- name: Check ${{ env.TARGET }} is present and has not been updated
run: |
git checkout ${{ env.TARGET }}
{
echo "Commit build products"
echo "Commit build products"
echo -n "Initialise empty site"
} >/tmp/expected
diff <(git log --pretty="format:%s") /tmp/expected