Fix CI development mode test to catch guard internal errors #35
This file contains hidden or 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: 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 |