blob: b55d2438374b47da1b2c681561baa5272b39408a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
uses: coverallsapp/github-action@master
if: matrix.node == 12 && github.repository == 'twbs/bootlint'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
|