summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-10-12 02:17:05 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-10-12 02:44:31 -0600
commitba87f88c90958569299f1494fb43debfe1d11b1c (patch)
tree06333002ca11a6a22c6d8e6f99ea3bd0533d9da1 /.github
parent360416b2cf735beb4a87505137e4acda10ec57d7 (diff)
manage bundler groups correctly in CI workflow
- start by excluding coverage, docs, and lint - reenable coverage and docs groups for primary - run tests as last step - ignore coverage group if Ruby version < 2.5.0
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml16
1 files changed, 10 insertions, 6 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 11584e6a..d8049126 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -58,7 +58,7 @@ jobs:
primary: primary
runs-on: ${{ matrix.os }}
env:
- BUNDLE_WITHOUT: docs
+ BUNDLE_WITHOUT: coverage:docs
SOURCE_DATE_EPOCH: '1521504000'
# work around `Permission denied - NUL' error when installing/using the bundler gem on JRuby for Windows
JRUBY_OPTS: '-J-Djdk.io.File.enableADS=true'
@@ -71,9 +71,6 @@ jobs:
- name: Configure Nokogiri installation (Linux, macOS)
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: echo 'BUNDLE_BUILD__NOKOGIRI=--use-system-libraries' >> $GITHUB_ENV
- - name: Enable coverage
- if: matrix.primary
- run: echo 'COVERAGE=true' >> $GITHUB_ENV
- name: Set AsciiMath version
if: matrix.asciimath-version
run: echo 'ASCIIMATH_VERSION=${{ matrix.asciimath-version }}' >> $GITHUB_ENV
@@ -83,6 +80,11 @@ jobs:
- name: Set Rouge version
if: matrix.rouge-version
run: echo 'ROUGE_VERSION=${{ matrix.rouge-version }}' >> $GITHUB_ENV
+ - name: Enable coverage (primary only)
+ if: matrix.primary
+ run: |
+ echo 'BUNDLE_WITHOUT=docs' >> $GITHUB_ENV
+ echo 'COVERAGE=true' >> $GITHUB_ENV
- name: Install Ruby (uses cached dependencies for non-scheduled build)
uses: ruby/setup-ruby@v1
with:
@@ -94,8 +96,6 @@ jobs:
run: |
bundle config --local path vendor/bundle
bundle --jobs 3 --retry 3
- - name: Run tests
- run: bundle exec ruby -w $(bundle exec ruby -e 'print File.join Gem.bindir, %q(rake)') test:all
- name: Check default stylesheet
if: matrix.primary
run: |
@@ -109,11 +109,15 @@ jobs:
git diff
exit 1
fi
+ - name: Run tests
+ run: bundle exec ruby -w $(bundle exec ruby -e 'print File.join Gem.bindir, %q(rake)') test:all
build-dependents:
name: build:dependents
if: success() && github.event_name == 'push' && github.repository == 'asciidoctor/asciidoctor'
needs: build
runs-on: ubuntu-latest
+ env:
+ BUNDLE_WITHOUT: docs:coverage
steps:
- name: Checkout
uses: actions/checkout@v2