Compare commits

..

7 Commits

Author SHA1 Message Date
Yoann Chaudet 8e8c7a0a95 Update test fixtures 2022-03-03 20:14:15 -08:00
Yoann Chaudet 24657da185 Bump github-pages to 225 2022-03-03 20:06:30 -08:00
Mingzi 0491312bd8 Merge pull request #25 from actions/YiMysty-patch-1
Update shellcheck as the action documented readme
2022-02-08 14:56:44 -08:00
Mingzi 07cc42d8a0 Update shellcheck.yml 2022-02-08 12:15:57 -08:00
Yoann Chaudet 1f005b94af Merge pull request #23 from actions/test
Refactor tests to use a matrix
2022-02-08 10:30:28 -08:00
Yoann Chaudet c6b6e3f6a6 Fix typo 2022-02-07 18:23:34 -08:00
Yoann Chaudet 45e128e769 Refactor tests to use a matrix 2022-02-07 18:19:51 -08:00
11 changed files with 42 additions and 241 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
uses: ludeeus/action-shellcheck@master
with:
version: v0.8.0
format: tty
+19 -223
View File
@@ -1,14 +1,14 @@
name: 'Test'
name: "Test"
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- "README.md"
pull_request:
paths-ignore:
- 'README.md'
- "README.md"
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
@@ -34,11 +34,20 @@ jobs:
text: ${{ steps.grep-image-content.outputs.image }}
regex: "jekyll-build-pages:(.*)'"
test-simple:
test-builds:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: simple
strategy:
matrix:
test:
- simple
- readme
- octicons
- mojombo
- themes
- jekyll-include-cache
- future-false
- future-true
steps:
- name: Checkout repository
uses: actions/checkout@v2
@@ -48,227 +57,14 @@ jobs:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
- name: Test ${{ matrix.test }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
source: ./test_projects/${{ matrix.test }}
destination: ./test_projects/${{ matrix.test }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-readme:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: readme
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-octicons:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: octicons
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-mojombo:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: mojombo
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-themes:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: themes
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-jekyll-include-cache:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: jekyll-include-cache
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-future-false:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: future-false
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-future-true:
needs: resolve-image-tag
runs-on: ubuntu-latest
env:
TEST_NAME: future-true
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Test ${{ env.TEST_NAME }} Project
uses: ./
with:
source: ./test_projects/${{ env.TEST_NAME }}
destination: ./test_projects/${{ env.TEST_NAME }}/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify output
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-runner-has-permission:
needs: resolve-image-tag
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build local docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Build simple project
uses: ./
with:
source: ./test_projects/simple
destination: ./test_projects/simple/_site
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Verify permissions on the build assets
run: |
if ! [[ -r ./test_projects/simple/_site/index.html ]]; then
echo '::error::Read permission is missing' && exit 1
fi
if ! [[ -w ./test_projects/simple/_site/index.html ]]; then
echo '::error::Write permission is missing' && exit 1
fi
shell: bash
./bin/compare_expected_output ./test_projects/${{matrix.test}}
+1 -1
View File
@@ -5,7 +5,7 @@ source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# Manage our dependency on the version of the github-pages gem here.
gem "github-pages", "= 223"
gem "github-pages", "= 225"
# Explicitly include this gem here.
# It is not directly included in the github-pages gem list of dependencies,
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>The Future is Looking Bright! | jekyll-build-pages</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="The Future is Looking Bright!" />
@@ -20,7 +20,7 @@
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="The Future is Looking Bright!" />
<script type="application/ld+json">
{"mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"},"description":"Everythings coming up Milhouse.","url":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html","@type":"BlogPosting","headline":"The Future is Looking Bright!","dateModified":"2020-02-13T00:00:00-05:00","datePublished":"2020-02-13T00:00:00-05:00","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2020-02-13T00:00:00-05:00","datePublished":"2020-02-13T00:00:00-05:00","description":"Everythings coming up Milhouse.","headline":"The Future is Looking Bright!","mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"},"url":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>The Future is Looking Bright! | jekyll-build-pages</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="The Future is Looking Bright!" />
@@ -20,7 +20,7 @@
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="The Future is Looking Bright!" />
<script type="application/ld+json">
{"mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"},"description":"Everythings coming up Milhouse.","url":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html","@type":"BlogPosting","headline":"The Future is Looking Bright!","dateModified":"2020-02-13T00:00:00-05:00","datePublished":"2020-02-13T00:00:00-05:00","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2020-02-13T00:00:00-05:00","datePublished":"2020-02-13T00:00:00-05:00","description":"Everythings coming up Milhouse.","headline":"The Future is Looking Bright!","mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"},"url":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>We Live In Hell | jekyll-build-pages</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="We Live In Hell" />
@@ -20,7 +20,7 @@
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="We Live In Hell" />
<script type="application/ld+json">
{"mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html"},"description":"And its not even the cool hell that [redacted] are afraid of. 😭","url":"https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html","@type":"BlogPosting","headline":"We Live In Hell","dateModified":"2022-03-01T00:00:00-05:00","datePublished":"2022-03-01T00:00:00-05:00","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2022-03-01T00:00:00-05:00","datePublished":"2022-03-01T00:00:00-05:00","description":"And its not even the cool hell that [redacted] are afraid of. 😭","headline":"We Live In Hell","mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html"},"url":"https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>jekyll-build-pages</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="jekyll-build-pages" />
@@ -13,10 +13,11 @@
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:site_name" content="jekyll-build-pages" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="jekyll-build-pages" />
<script type="application/ld+json">
{"headline":"jekyll-build-pages","url":"https://github.com/pages/actions/jekyll-build-pages/","@type":"WebSite","name":"jekyll-build-pages","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"WebSite","headline":"jekyll-build-pages","name":"jekyll-build-pages","url":"https://github.com/pages/actions/jekyll-build-pages/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
+3 -2
View File
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Readme Test | jekyll-build-pages</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="Readme Test" />
@@ -13,10 +13,11 @@
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:site_name" content="jekyll-build-pages" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Readme Test" />
<script type="application/ld+json">
{"url":"https://github.com/pages/actions/jekyll-build-pages/","@type":"WebSite","headline":"Readme Test","name":"jekyll-build-pages","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"WebSite","headline":"Readme Test","name":"jekyll-build-pages","url":"https://github.com/pages/actions/jekyll-build-pages/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
+3 -2
View File
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Readme Test | jekyll-build-pages</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="Readme Test" />
@@ -13,10 +13,11 @@
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:site_name" content="jekyll-build-pages" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Readme Test" />
<script type="application/ld+json">
{"url":"https://github.com/pages/actions/jekyll-build-pages/","@type":"WebSite","headline":"Readme Test","name":"jekyll-build-pages","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"WebSite","headline":"Readme Test","name":"jekyll-build-pages","url":"https://github.com/pages/actions/jekyll-build-pages/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
+3 -2
View File
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Jekyll Actions Demo</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="Jekyll Actions Demo" />
@@ -13,10 +13,11 @@
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:site_name" content="Jekyll Actions Demo" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Jekyll Actions Demo" />
<script type="application/ld+json">
{"url":"https://github.com/pages/actions/jekyll-build-pages/","@type":"WebSite","headline":"Jekyll Actions Demo","name":"Jekyll Actions Demo","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"WebSite","headline":"Jekyll Actions Demo","name":"Jekyll Actions Demo","url":"https://github.com/pages/actions/jekyll-build-pages/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
+3 -2
View File
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.7.1 -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>themes</title>
<meta name="generator" content="Jekyll v3.9.0" />
<meta property="og:title" content="themes" />
@@ -13,10 +13,11 @@
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/" />
<meta property="og:site_name" content="themes" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="themes" />
<script type="application/ld+json">
{"url":"https://github.com/pages/actions/jekyll-build-pages/","@type":"WebSite","headline":"themes","name":"themes","@context":"https://schema.org"}</script>
{"@context":"https://schema.org","@type":"WebSite","headline":"themes","name":"themes","url":"https://github.com/pages/actions/jekyll-build-pages/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">