-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch CI workflow to GitHub Actions
- Loading branch information
1 parent
5ed88b6
commit d0bb4be
Showing
2 changed files
with
45 additions
and
18 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: ['**'] | ||
paths-ignore: ['*.adoc', 'docs/**'] | ||
pull_request: | ||
branches: [master] | ||
paths-ignore: ['*.adoc', 'docs/**'] | ||
#schedule: | ||
#- cron: '30 2 * * MON' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
activate: | ||
if: | | ||
(github.event_name == 'schedule' && github.repository_owner == 'asciidoctor') || | ||
(github.event_name == 'push') || | ||
(github.event_name == 'pull_request' && !startsWith(github.head_ref, 'docs/')) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Proceed | ||
run: echo ok go | ||
build: | ||
needs: activate | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
ruby: ['2.7'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Ruby (uses cached dependencies for non-scheduled build) | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: ${{ github.event_name != 'schedule' }} | ||
- name: Install dependencies (scheduled build only) | ||
if: github.event_name == 'schedule' | ||
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)') spec |
This file was deleted.
Oops, something went wrong.