2019-09-24 11:53:50 +02:00
|
|
|
name: Tests
|
2019-08-08 18:40:26 +02:00
|
|
|
on: [push, pull_request]
|
2019-10-08 07:47:40 +02:00
|
|
|
env:
|
|
|
|
CI: true
|
2019-08-08 18:40:26 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
name: Node ${{ matrix.node }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
2019-08-24 01:32:29 +02:00
|
|
|
fail-fast: false
|
2019-08-08 18:40:26 +02:00
|
|
|
matrix:
|
2019-10-09 10:11:37 +02:00
|
|
|
node: [10, 12]
|
2019-08-08 18:40:26 +02:00
|
|
|
|
|
|
|
steps:
|
2019-08-24 01:32:29 +02:00
|
|
|
- name: Clone repository
|
2019-09-24 11:53:50 +02:00
|
|
|
uses: actions/checkout@v1
|
2019-08-09 17:28:41 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 3
|
|
|
|
|
|
|
|
- name: Set Node.js version
|
2019-09-16 14:28:25 +02:00
|
|
|
uses: actions/setup-node@v1
|
2019-08-09 17:28:41 +02:00
|
|
|
with:
|
2019-09-16 14:28:25 +02:00
|
|
|
node-version: ${{ matrix.node }}
|
2019-08-09 17:28:41 +02:00
|
|
|
|
|
|
|
- run: node --version
|
|
|
|
- run: npm --version
|
|
|
|
- run: java -version
|
|
|
|
|
|
|
|
- name: Install npm dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: npm test
|
|
|
|
|
|
|
|
- name: Run bundlesize
|
|
|
|
run: npm run bundlesize
|
2019-08-24 01:32:29 +02:00
|
|
|
if: matrix.node == 10
|
2019-08-09 17:28:41 +02:00
|
|
|
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 Coveralls
|
|
|
|
run: npm run coveralls
|
|
|
|
if: matrix.node == 10 && github.repository == 'twbs/bootstrap' && github.event_name == 'push'
|
|
|
|
env:
|
|
|
|
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
|
2019-10-02 21:05:15 +02:00
|
|
|
COVERALLS_GIT_BRANCH: "${{ github.ref }}"
|