CI #217
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
name: CI | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
schedule: | |
- cron: 0 0 * * 1 | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prep binaries | |
run: | | |
docker pull silex/emacs:28.2-alpine | |
docker pull dkhamsing/awesome_bot:1.20.0 | |
- name: Table of Contents correctly being generated check | |
run: | | |
EMACS="docker run -i --rm -v $(pwd):$(pwd) -w $(pwd) silex/emacs:28.2-alpine emacs" | |
$EMACS --version | |
cp README.org README.org.original | |
diff README.org README.org.original | |
$EMACS README.org -Q -batch --eval "(progn (setq package-archives '((\"melpa\" . \"https://melpa.org/packages/\"))) (package-initialize) (when (not (package-installed-p 'toc-org)) (when (not package-archive-contents) (package-refresh-contents)) (package-install 'toc-org)) (require 'toc-org) (toc-org-insert-toc) (save-buffer))" | |
diff README.org README.org.original | |
echo "If the README pre and post processing are identical, the diff should exit with 0. Otherwise, an error code indicates that toc-org should have been run to update the Table of Contents." | |
- name: awesome_bot links check | |
run: | | |
AWESOME_BOT="docker run -i --rm -v $(pwd):$(pwd):rw -w $(pwd) dkhamsing/awesome_bot:1.20.0" | |
$AWESOME_BOT --version | |
ALLOWED_INTERNAL_LINKS="ternjs,melpa" | |
ALLOWED_REDIRECT_LINKS="awesome.re" | |
$AWESOME_BOT README.org --request-delay 0.15 --allow-ssl --white-list ternjs,melpa,awesome.re,Matching.html |