Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Switch to GitHub Actions CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Jul 16, 2020
1 parent ad863e1 commit f336e46
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 31 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,83 @@
name: Tests
on: [push, pull_request]

env:
CI: true
RUBY: 2.6.x

jobs:
run:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node: [6, 8, 10, 12, 14]

steps:
- uses: actions/checkout@v2

- name: Clone twbs/bootstrap repository
uses: actions/checkout@v2
with:
repository: twbs/bootstrap
ref: v3-dev
path: bootstrap

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY }}

- name: Set up Ruby cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('bootstrap/Gemfile') }}-${{ hashFiles('bootstrap/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('bootstrap/Gemfile') }}-${{ hashFiles('bootstrap/Gemfile.lock') }}
${{ runner.os }}-ruby-v${{ env.RUBY }}-
- name: Disable gem docs
run: 'echo "gem: --no-document" > ~/.gemrc'

- name: Set up Bundler
run: gem install bundler -v "~> 1.17"

- run: ruby --version
- run: gem --version
- run: bundle --version

- name: Install npm dependencies
run: npm install

- name: Set up Bootstrap repo, doc deps and build docs
run: |
bundle install --deployment --path "$(pwd)/vendor/bundle" --gemfile bootstrap/Gemfile --jobs=3 --retry=3
pushd bootstrap && bundle exec jekyll build && popd
- name: Run tests with Coveralls
run: npm run nyc -- npm run test && npm run qunit
if: matrix.node == 12

- name: Run tests
run: npm test
if: matrix.node != 12

- name: Run extra tests
run: |
node ./src/cli-main.js --disable W003,W005 "bootstrap/_gh_pages/**/index.html"
node ./src/cli-main.js test/fixtures/x-ua-compatible/missing.html &> x-ua-compatible-missing.output.actual.txt || true
diff test/fixtures/cli/x-ua-compatible-missing.output.txt x-ua-compatible-missing.output.actual.txt
- name: Run Coveralls
run: npm run coveralls
if: matrix.node == 12 && github.repository == 'twbs/bootlint' && github.event_name == 'push'
env:
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
# Bootlint

[![NPM version](https://img.shields.io/npm/v/bootlint.svg)](https://www.npmjs.com/package/bootlint)
[![Build Status](https://img.shields.io/travis/twbs/bootlint/master.svg)](https://travis-ci.org/twbs/bootlint)
[![Build Status](https://github.com/twbs/bootlint/workflows/Tests/badge.svg)](https://github.com/twbs/bootlint/actions?workflow=Tests)
[![Coverage Status](https://img.shields.io/coveralls/twbs/bootlint.svg?branch=master)](https://coveralls.io/r/twbs/bootlint)
![Development Status :: 5 - Production/Stable](https://img.shields.io/badge/maturity-stable-green.svg "Development Status :: 5 - Production/Stable")
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg "MIT License")](https://github.com/twbs/bootlint/blob/master/LICENSE)
Expand Down

0 comments on commit f336e46

Please sign in to comment.