Skip to content

Commit

Permalink
Split GitHub Actions.
Browse files Browse the repository at this point in the history
Everything should be faster now, and assuming caching is implemented it should be even faster. Also, we can restart a failed workflow and not the whole thing like before.
  • Loading branch information
XhmikosR committed Oct 28, 2019
1 parent 4d66112 commit 1a18dfb
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 17 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: BrowserStack
on: [push]
env:
CI: true

jobs:
browserstack:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v1
with:
fetch-depth: 3

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: "10"

- run: node --version
- run: npm --version

- name: Install npm dependencies
run: npm ci

- name: Run dist
run: npm run dist

- name: Run BrowserStack tests
run: npm run js-test-cloud
env:
BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}"
BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}"
33 changes: 33 additions & 0 deletions .github/workflows/bundlesize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Bundlesize
on: [push, pull_request]
env:
CI: true

jobs:
bundlesize:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v1
with:
fetch-depth: 3

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: "10"

- run: node --version
- run: npm --version

- name: Install npm dependencies
run: npm ci

- name: Run dist
run: npm run dist

- name: Run bundlesize
run: npm run bundlesize
env:
BUNDLESIZE_GITHUB_TOKEN: "${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}"
28 changes: 28 additions & 0 deletions .github/workflows/css.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CSS
on: [push, pull_request]
env:
CI: true

jobs:
css:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v1
with:
fetch-depth: 3

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: "10"

- run: node --version
- run: npm --version

- name: Install npm dependencies
run: npm ci

- name: Build CSS
run: npm run css
29 changes: 29 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docs
on: [push, pull_request]
env:
CI: true

jobs:
docs:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v1
with:
fetch-depth: 3

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: "10"

- run: node --version
- run: npm --version
- run: java -version

- name: Install npm dependencies
run: npm ci

- name: Test docs
run: npm run docs
21 changes: 5 additions & 16 deletions .github/workflows/test.yml → .github/workflows/js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: JS Tests
on: [push, pull_request]
env:
CI: true
Expand Down Expand Up @@ -26,26 +26,15 @@ jobs:

- run: node --version
- run: npm --version
- run: java -version

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm test
- name: Run dist
run: npm run js

- name: Run bundlesize
run: npm run bundlesize
if: matrix.node == 10
env:
BUNDLESIZE_GITHUB_TOKEN: "${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}"

- name: Run BrowserStack tests
run: npm run js-test-cloud
if: matrix.node == 10 && github.repository == 'twbs/bootstrap' && github.event_name == 'push'
env:
BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}"
BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}"
- name: Run JS tests
run: npm run js-test

- name: Run Coveralls
run: npm run coveralls
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint
on: [push, pull_request]
env:
CI: true

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v1
with:
fetch-depth: 3

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: "10"

- run: node --version
- run: npm --version

- name: Install npm dependencies
run: npm ci

- name: Lint CSS and JS
run: npm run lint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Read the [Getting started page](https://getbootstrap.com/docs/4.3/getting-starte

## Status

[![Build Status](https://github.com/twbs/bootstrap/workflows/Tests/badge.svg)](https://github.com/twbs/bootstrap/actions?workflow=Tests)
[![Build Status](https://github.com/twbs/bootstrap/workflows/JS%20Tests/badge.svg)](https://github.com/twbs/bootstrap/actions?workflow=JS+Tests)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap)
Expand Down

0 comments on commit 1a18dfb

Please sign in to comment.