-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support recording expected output in an action!
the `record_expected_output` script now uses the `act` utility (https://github.com/nektos/act) to run this repo's action in a container as github actions would. You can now pass one argument to that, `local`, to go back to running `github-pages` on your local ruby install. (I removed the `.ruby-version` file since we don't *need* to record using the local env anymore, so make sure that you're on Ruby 2.7.4) This eliminates the inconsistency between recorded output and generated output on actions, so we don't need to ignore any lines in `diff` anymore.
- Loading branch information
Jess Bees
committed
Feb 2, 2022
1 parent
12272ee
commit 5a78e45
Showing
10 changed files
with
86 additions
and
18 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,68 @@ | ||
| name: Record Expected | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| record-expected-output: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Build test project 'simple' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/simple | ||
| destination: test_projects/simple/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
||
| - name: Build test project 'readme' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/readme | ||
| destination: test_projects/readme/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
||
| - name: Build test project 'octicons' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/octicons | ||
| destination: test_projects/octicons/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
||
| - name: Build test project 'mojombo' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/mojombo | ||
| destination: test_projects/mojombo/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
||
| - name: Build test project 'themes' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/themes | ||
| destination: test_projects/themes/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
||
| - name: Build test project 'jekyll-include-cache' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/jekyll-include-cache | ||
| destination: test_projects/jekyll-include-cache/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
||
| - name: Build test project 'future-false' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/future-false | ||
| destination: test_projects/future-false/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
||
| - name: Build test project 'future-true' | ||
| uses: ./ | ||
| with: | ||
| source: test_projects/future-true | ||
| destination: test_projects/future-true/_expected | ||
| build_revision: JEKYLL_BUILD_REVISION | ||
|
|
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 |
|---|---|---|
| @@ -1,10 +1,14 @@ | ||
| #! /usr/bin/env sh | ||
|
|
||
| export JEKYLL_ENV=production | ||
| export PAGES_REPO_NWO=actions/jekyll-build-pages | ||
| export JEKYLL_BUILD_REVISION=JEKYLL_BUILD_REVISION | ||
| if [ "local" = "$1" ]; then | ||
| export JEKYLL_ENV=production | ||
| export PAGES_REPO_NWO=actions/jekyll-build-pages | ||
| export JEKYLL_BUILD_REVISION=JEKYLL_BUILD_REVISION | ||
|
|
||
| for dir in $(ls test_projects) | ||
| do | ||
| bundle exec github-pages build --verbose -s test_projects/$dir -d test_projects/$dir/_expected | ||
| done | ||
| for dir in $(ls test_projects) | ||
| do | ||
| bundle exec github-pages build --verbose -s test_projects/$dir -d test_projects/$dir/_expected | ||
| done | ||
| else | ||
| act -b -s GITHUB_TOKEN -j record-expected-output | ||
| 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
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 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