build: use GitHub Actions instead of Travis CI
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 28db2c2 · Browse files · 3 files·+137 added−80 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+137 added−80 removed
- other:+137 added−80 removed
Provenance
- Commit
ca3c863- Tree
f5d23ec- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
28db2c2
3 files changed+137 added−80 removed
added:.github/workflows/ci.yml+134 added
1+name: ci2+3+on:4+- pull_request5+- push6+7+jobs:8+ test:9+ runs-on: ubuntu-latest10+ strategy:11+ matrix:12+ name:13+ - Node.js 0.1014+ - Node.js 0.1215+ - io.js 1.x16+ - io.js 2.x17+ - io.js 3.x18+ - Node.js 4.x19+ - Node.js 5.x20+ - Node.js 6.x21+ - Node.js 7.x22+ - Node.js 8.x23+ - Node.js 9.x24+ - Node.js 10.x25+ - Node.js 11.x26+ - Node.js 12.x27+28+ include:29+ - name: Node.js 0.1030+ node-version: "0.10"31+ npm-i: mocha@3.5.3 supertest@2.0.032+33+ - name: Node.js 0.1234+ node-version: "0.12"35+ npm-i: mocha@3.5.3 supertest@2.0.036+37+ - name: io.js 1.x38+ node-version: "1.8"39+ npm-i: mocha@3.5.3 supertest@2.0.040+41+ - name: io.js 2.x42+ node-version: "2.5"43+ npm-i: mocha@3.5.3 supertest@2.0.044+45+ - name: io.js 3.x46+ node-version: "3.3"47+ npm-i: mocha@3.5.3 supertest@2.0.048+49+ - name: Node.js 4.x50+ node-version: "4.9"51+ npm-i: mocha@5.2.0 supertest@3.4.252+53+ - name: Node.js 5.x54+ node-version: "5.12"55+ npm-i: mocha@5.2.0 supertest@3.4.256+57+ - name: Node.js 6.x58+ node-version: "6.17"59+ npm-i: mocha@6.2.260+61+ - name: Node.js 7.x62+ node-version: "7.10"63+ npm-i: mocha@6.2.264+65+ - name: Node.js 8.x66+ node-version: "8.17"67+ npm-i: mocha@7.2.068+69+ - name: Node.js 9.x70+ node-version: "9.11"71+ npm-i: mocha@7.2.072+73+ - name: Node.js 10.x74+ node-version: "10.23"75+76+ - name: Node.js 11.x77+ node-version: "11.15"78+79+ - name: Node.js 12.x80+ node-version: "12.18"81+82+ steps:83+ - uses: actions/checkout@v284+85+ - name: Install Node.js ${{ matrix.node-version }}86+ shell: bash -eo pipefail -l {0}87+ run: |88+ nvm install --default ${{ matrix.node-version }}89+ dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"90+91+ - name: Configure npm92+ run: npm config set shrinkwrap false93+94+ - name: Install npm module(s) ${{ matrix.npm-i }}95+ run: npm install --save-dev ${{ matrix.npm-i }}96+ if: matrix.npm-i != ''97+98+ - name: Remove non-test dependencies99+ run: npm rm --silent --save-dev connect-redis100+101+ - name: Install Node.js dependencies102+ run: npm install103+104+ - name: List environment105+ id: list_env106+ shell: bash107+ run: |108+ echo "node@$(node -v)"109+ echo "npm@$(npm -v)"110+ npm -s ls ||:111+112+ - name: Run tests113+ shell: bash114+ run: npm run test-ci115+116+ - name: Lint code117+ run: npm run lint118+119+ - name: Collect code coverage120+ uses: coverallsapp/github-action@master121+ with:122+ github-token: ${{ secrets.GITHUB_TOKEN }}123+ flag-name: run-${{ matrix.test_number }}124+ parallel: true125+126+ coverage:127+ needs: test128+ runs-on: ubuntu-latest129+ steps:130+ - name: Upload code coverage131+ uses: coverallsapp/github-action@master132+ with:133+ github-token: ${{ secrets.github_token }}134+ parallel-finished: truedeleted:.travis.yml-77 removed
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677language: node_jsnode_js: - "0.10" - "0.12" - "1.8" - "2.5" - "3.3" - "4.9" - "5.12" - "6.17" - "7.10" - "8.17" - "9.11" - "10.23" - "11.15" - "12.18"matrix: include: - node_js: "13" env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly" allow_failures: # Allow the nightly installs to fail - env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly"cache: directories: - node_modulesbefore_install: # Configure npm - | # Skip updating shrinkwrap / lock npm config set shrinkwrap false # Remove all non-test dependencies - | # Remove example dependencies npm rm --silent --save-dev connect-redis # Setup Node.js version-specific dependencies - | # mocha for testing # - use 3.x for Node.js < 4 # - use 5.x for Node.js < 6 # - use 6.x for Node.js < 8 # - use 7.x for Node.js < 10 if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 4 ]]; then npm install --silent --save-dev mocha@3.5.3 elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then npm install --silent --save-dev mocha@5.2.0 elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 8 ]]; then npm install --silent --save-dev mocha@6.2.2 elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 10 ]]; then npm install --silent --save-dev mocha@7.2.0 fi - | # supertest for http calls # - use 2.0.0 for Node.js < 4 # - use 3.4.2 for Node.js < 6 if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 4 ]]; then npm install --silent --save-dev supertest@2.0.0 elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then npm install --silent --save-dev supertest@3.4.2 fi # Update Node.js modules - | # Prune and rebuild node_modules if [[ -d node_modules ]]; then npm prune npm rebuild fiscript: # Run test script - npm run test-ci # Run linting - npm run lintafter_script: - | # Upload coverage to coveralls npm install --save-dev coveralls@2.12.0 coveralls < ./coverage/lcov.infomodified:Readme.md+3 added-3 removed
2 unmodified lines345677891011133 unmodified linesExpand all1451461471481491501511521531541531541551561571582 unmodified lines Fast, unopinionated, minimalist web framework for [node](http://nodejs.org).
[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Linux Build][travis-image]][travis-url] [![Linux Build][ci-image]][ci-url] [![Windows Build][appveyor-image]][appveyor-url] [![Test Coverage][coveralls-image]][coveralls-url]
```js133 unmodified linesExpand all## License
[MIT](LICENSE)
[ci-image]: https://img.shields.io/github/workflow/status/expressjs/express/ci/master.svg?label=linux[ci-url]: https://github.com/expressjs/express/actions?query=workflow%3Aci[npm-image]: https://img.shields.io/npm/v/express.svg[npm-url]: https://npmjs.org/package/express[downloads-image]: https://img.shields.io/npm/dm/express.svg[downloads-url]: https://npmcharts.com/compare/express?minimal=true[travis-image]: https://img.shields.io/travis/expressjs/express/master.svg?label=linux[travis-url]: https://travis-ci.org/expressjs/express[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/express/master.svg?label=windows[appveyor-url]: https://ci.appveyor.com/project/dougwilson/express[coveralls-image]: https://img.shields.io/coveralls/expressjs/express/master.svg[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master