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:17:05 -0600
commit24956eff390f56d27c62accf0f6ea4a6eeb89b8f (patch)
tree2960c3d3c03a14273e174485c3ea7c64fcae7258 /.github
parentc533889f1ed086ce90206cfffe37d371fc02c5d3 (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 5ed5e9dc..b146333b 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:lint
SOURCE_DATE_EPOCH: '1521504000'
steps:
- name: Checkout
@@ -69,9 +69,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
@@ -81,6 +78,11 @@ jobs:
- name: Set Rouge version
if: matrix.rouge-version
run: echo 'ROUGE_VERSION=${{ matrix.rouge-version }}' >> $GITHUB_ENV
+ - name: Enable lint and 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:
@@ -92,8 +94,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: Run linter
if: matrix.primary
run: bundle exec rake lint
@@ -110,11 +110,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:lint:coverage
steps:
- name: Checkout
uses: actions/checkout@v2