Skip to content

Commit 75e2f60

Browse files
authored
ci: added GitHub Action workflow for CI (react-bootstrap#4324)
1 parent dde93b2 commit 75e2f60

File tree

6 files changed

+48
-50
lines changed

6 files changed

+48
-50
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/nodejs.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Node CI
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ${{ matrix.os }}
6+
strategy:
7+
matrix:
8+
browser: [ChromeHeadless, FirefoxHeadless]
9+
os: [ubuntu-latest, windows-latest, macOS-latest]
10+
steps:
11+
- name: Checking out Repository
12+
uses: actions/checkout@v1
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 12.x
17+
- name: Update Brew (macOS)
18+
if: matrix.os == 'macOS-latest'
19+
run: brew update
20+
- name: Install Chrome (macOS)
21+
if: matrix.os == 'macOS-latest' && matrix.browser == 'ChromeHeadless'
22+
run: brew cask install google-chrome
23+
- name: Install Firefox (macOS)
24+
if: matrix.os == 'macOS-latest' && matrix.browser == 'FirefoxHeadless'
25+
run: brew cask install firefox
26+
- name: Install Dependencies
27+
run: yarn bootstrap
28+
- name: Run Tests
29+
run: yarn test
30+
env:
31+
BROWSER: ${{ matrix.browser }}
32+
- name: Upload Test Coverage to codecov
33+
run: yarn run codecov
34+
env:
35+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
36+
- name: Build Project
37+
run: yarn build

.travis.yml

+5-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
language: node_js
22
node_js:
33
- node
4-
5-
jobs:
6-
include:
7-
- addons:
8-
chrome: stable
9-
env: BROWSER=ChromeCi
10-
- addons:
11-
firefox: latest
12-
env: BROWSER=Firefox
13-
14-
services:
15-
- xvfb
4+
env:
5+
global:
6+
- BROWSER=ChromeHeadless
7+
addons:
8+
chrome: stable
169

1710
cache:
1811
yarn: true
@@ -23,10 +16,6 @@ cache:
2316
install:
2417
- yarn bootstrap
2518

26-
after_success:
27-
- node_modules/.bin/codecov
28-
2919
branches:
3020
only:
3121
- master
32-
- next

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
> [Bootstrap 4][bootstrap] components built with [React][react].
44
5-
[![Travis CI Build status][travis-badge]][travis-link]
6-
[![Appveyor Build status][appveyor-badge]][appveyor-link]
5+
[![GitHub Actions Build status][gh-actions-badge]][gh-actions]
6+
[![Travis CI Build status][travis-badge]][travis]
77
[![npm][npm-badge]][npm]
88
[![Codecov][codecov-badge]][codecov]
99
[![Discord][discord-badge]][discord]
@@ -51,9 +51,7 @@ Yes please! See the [contributing guidelines][contributing] for details.
5151
[documentation]: https://react-bootstrap.github.io/
5252
[contributing]: CONTRIBUTING.md
5353
[travis-badge]: https://travis-ci.org/react-bootstrap/react-bootstrap.svg?branch=master
54-
[travis-link]: https://travis-ci.org/react-bootstrap/react-bootstrap
55-
[appveyor-badge]: https://ci.appveyor.com/api/projects/status/ylitpyo6n5yq1s6i?svg=true
56-
[appveyor-link]: https://ci.appveyor.com/project/react-bootstrap/react-bootstrap
54+
[travis]: https://travis-ci.org/react-bootstrap/react-bootstrap
5755
[npm-badge]: https://badge.fury.io/js/react-bootstrap.svg
5856
[npm]: http://badge.fury.io/js/react-bootstrap
5957
[react-router-bootstrap]: https://github.com/react-bootstrap/react-router-bootstrap
@@ -66,3 +64,5 @@ Yes please! See the [contributing guidelines][contributing] for details.
6664
[discord]: https://discord.gg/0ZcbPKXt5bXLs9XK
6765
[netlify-badge]: https://api.netlify.com/api/v1/badges/91501718-8820-4d69-b7fe-1616eff5914e/deploy-status
6866
[netlify]: https://app.netlify.com/sites/react-bootstrap/deploys
67+
[gh-actions-badge]: https://github.com/react-bootstrap/react-bootstrap/workflows/Node%20CI/badge.svg
68+
[gh-actions]: https://github.com/react-bootstrap/react-bootstrap/actions

appveyor.yml

-22
This file was deleted.

karma.conf.js

-7
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@ module.exports = config => {
5353
dir: 'coverage',
5454
},
5555

56-
customLaunchers: {
57-
ChromeCi: {
58-
base: 'Chrome',
59-
flags: ['--no-sandbox'],
60-
},
61-
},
62-
6356
browsers: env.BROWSER ? env.BROWSER.split(',') : ['Chrome'],
6457

6558
singleRun: env.CONTINUOUS_INTEGRATION === 'true',

0 commit comments

Comments
 (0)