mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Adding CI on Github Actions. (#3938)
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [12.x, 14.x, 16.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
|
- run: npm install
|
||||||
|
- run: npm test
|
||||||
@@ -127,6 +127,9 @@ module.exports = function(config) {
|
|||||||
'Running on Travis.'
|
'Running on Travis.'
|
||||||
);
|
);
|
||||||
browsers = ['Firefox'];
|
browsers = ['Firefox'];
|
||||||
|
} else if (process.env.GITHUB_ACTIONS !== 'false') {
|
||||||
|
console.log('Running ci on Github Actions.');
|
||||||
|
browsers = ['FirefoxHeadless', 'ChromeHeadless'];
|
||||||
} else {
|
} else {
|
||||||
console.log('Running locally since SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not set.');
|
console.log('Running locally since SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not set.');
|
||||||
browsers = ['Firefox', 'Chrome'];
|
browsers = ['Firefox', 'Chrome'];
|
||||||
|
|||||||
Reference in New Issue
Block a user