Skip to content

Fix CI development mode test to catch guard internal errors #35

Fix CI development mode test to catch guard internal errors

Fix CI development mode test to catch guard internal errors #35

Workflow file for this run

name: Integration
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
integration:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
ruby-version: ['3.2', '3.3', '3.4', '4.0']
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Build and install gem
run: |
gem build scholarmarkdown.gemspec
gem install scholarmarkdown-*.gem --no-document
- name: Initialize ScholarMarkdown article
run: generate-scholarmarkdown my-article
- name: Install article dependencies
run: bundle install
working-directory: my-article
- name: Build article
run: bundle exec nanoc compile
working-directory: my-article
- name: Test development mode
run: |
rm -f guard.log
bundle exec guard --no-interactions > guard.log 2>&1 &
GUARD_PID=$!
sleep 5
cat guard.log
if grep -q ' - ERROR - ' guard.log; then exit 1; fi
kill -0 $GUARD_PID
kill $GUARD_PID
wait $GUARD_PID || true
working-directory: my-article