Skip to content

Commit

Permalink
Add test projects which test the 'future' config option
Browse files Browse the repository at this point in the history
  • Loading branch information
Jess Bees committed Feb 2, 2022
1 parent d0debd2 commit 12272ee
Show file tree
Hide file tree
Showing 12 changed files with 245 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,50 @@ jobs:
run: |
./bin/compare_expected_output ./test_projects/${{env.TEST_NAME}}
test-future-false:
runs-on: ubuntu-latest
env:
TEST_NAME: future-false
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Render Action Metadata
run: |
./bin/render_action_metadata Dockerfile > action.yml
- 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:
runs-on: ubuntu-latest
env:
TEST_NAME: future-true
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Render Action Metadata
run: |
./bin/render_action_metadata Dockerfile > action.yml
- 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}}
2 changes: 2 additions & 0 deletions test_projects/future-false/_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
time: 2022-02-02 02:02:02
timezone: America/New_York
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<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 -->
<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!" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Everything’s coming up Milhouse." />
<meta property="og:description" content="Everything’s coming up Milhouse." />
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html" />
<meta property="og:site_name" content="jekyll-build-pages" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2020-02-13T00:00:00-05:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="The Future is Looking Bright!" />
<script type="application/ld+json">
{"url":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html","headline":"The Future is Looking Bright!","dateModified":"2020-02-13T00:00:00-05:00","datePublished":"2020-02-13T00:00:00-05:00","@type":"BlogPosting","mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"},"description":"Everything’s coming up Milhouse.","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->

<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->

<!-- Setup Google Analytics -->



<!-- You can set your favicon here -->
<!-- link rel="shortcut icon" type="image/x-icon" href="/pages/actions/jekyll-build-pages/favicon.ico" -->

<!-- end custom head snippets -->

</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">

<h1><a href="https://github.com/pages/actions/jekyll-build-pages/">jekyll-build-pages</a></h1>


<p>Everything’s coming up Milhouse.</p>



<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
This site is open source. <a href="https://github.com/actions/jekyll-build-pages/edit/gh-pages/_posts/2020-02-13-the-future-is-looking-bright.md">Improve this page</a>.
</div>

</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
</body>
</html>
1 change: 1 addition & 0 deletions test_projects/future-false/_expected/assets/css/style.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: The Future is Looking Bright!
---

Everything's coming up Milhouse.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: We Live In Hell
---

And it's not even the cool hell that \[redacted\] are afraid of. 😭
3 changes: 3 additions & 0 deletions test_projects/future-true/_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
time: 2022-02-02 02:02:02
timezone: America/New_York
future: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<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 -->
<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!" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Everything’s coming up Milhouse." />
<meta property="og:description" content="Everything’s coming up Milhouse." />
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html" />
<meta property="og:site_name" content="jekyll-build-pages" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2020-02-13T00:00:00-05:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="The Future is Looking Bright!" />
<script type="application/ld+json">
{"url":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html","headline":"The Future is Looking Bright!","dateModified":"2020-02-13T00:00:00-05:00","datePublished":"2020-02-13T00:00:00-05:00","@type":"BlogPosting","mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2020/02/13/the-future-is-looking-bright.html"},"description":"Everything’s coming up Milhouse.","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->

<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->

<!-- Setup Google Analytics -->



<!-- You can set your favicon here -->
<!-- link rel="shortcut icon" type="image/x-icon" href="/pages/actions/jekyll-build-pages/favicon.ico" -->

<!-- end custom head snippets -->

</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">

<h1><a href="https://github.com/pages/actions/jekyll-build-pages/">jekyll-build-pages</a></h1>


<p>Everything’s coming up Milhouse.</p>



<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
This site is open source. <a href="https://github.com/actions/jekyll-build-pages/edit/gh-pages/_posts/2020-02-13-the-future-is-looking-bright.md">Improve this page</a>.
</div>

</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<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 -->
<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" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="And it’s not even the cool hell that [redacted] are afraid of. 😭" />
<meta property="og:description" content="And it’s not even the cool hell that [redacted] are afraid of. 😭" />
<link rel="canonical" href="https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html" />
<meta property="og:url" content="https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html" />
<meta property="og:site_name" content="jekyll-build-pages" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2022-03-01T00:00:00-05:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="We Live In Hell" />
<script type="application/ld+json">
{"url":"https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html","headline":"We Live In Hell","dateModified":"2022-03-01T00:00:00-05:00","datePublished":"2022-03-01T00:00:00-05:00","@type":"BlogPosting","mainEntityOfPage":{"@type":"WebPage","@id":"https://github.com/pages/actions/jekyll-build-pages/2022/03/01/we-live-in-hell.html"},"description":"And it’s not even the cool hell that [redacted] are afraid of. 😭","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->

<link rel="stylesheet" href="/pages/actions/jekyll-build-pages/assets/css/style.css?v=JEKYLL_BUILD_REVISION">
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->

<!-- Setup Google Analytics -->



<!-- You can set your favicon here -->
<!-- link rel="shortcut icon" type="image/x-icon" href="/pages/actions/jekyll-build-pages/favicon.ico" -->

<!-- end custom head snippets -->

</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">

<h1><a href="https://github.com/pages/actions/jekyll-build-pages/">jekyll-build-pages</a></h1>


<p>And it’s not even the cool hell that [redacted] are afraid of. 😭</p>



<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
This site is open source. <a href="https://github.com/actions/jekyll-build-pages/edit/gh-pages/_posts/2022-03-01-we-live-in-hell.md">Improve this page</a>.
</div>

</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
</body>
</html>
1 change: 1 addition & 0 deletions test_projects/future-true/_expected/assets/css/style.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: The Future is Looking Bright!
---

Everything's coming up Milhouse.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: We Live In Hell
---

And it's not even the cool hell that \[redacted\] are afraid of. 😭

0 comments on commit 12272ee

Please sign in to comment.