Skip to content

Commit 8d38a0b

Browse files
authored
ci: migrate to GitHub Actions
PR-URL: #2
2 parents 9eed03b + 727b4cd commit 8d38a0b

File tree

4 files changed

+72
-4
lines changed

4 files changed

+72
-4
lines changed

.github/workflows/ci.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: ci
2+
3+
on:
4+
- pull_request
5+
- push
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-20.04
10+
strategy:
11+
matrix:
12+
name:
13+
- Node.js 0.10
14+
- Node.js 0.12
15+
- io.js 1.x
16+
- io.js 2.x
17+
- io.js 3.x
18+
- Node.js 4.x
19+
- Node.js 6.x
20+
- Node.js 8.x
21+
- Node.js 10.x
22+
- Node.js 11.x
23+
- Node.js 12.x
24+
- Node.js 13.x
25+
- Node.js 14.x
26+
- Node.js 15.x
27+
- Node.js 16.x
28+
- Node.js 17.x
29+
- Node.js 18.x
30+
- Node.js 19.x
31+
- Node.js 20.x
32+
- Node.js 21.x
33+
- Node.js 22.x
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Install Node.js ${{ matrix.node-version }}
39+
shell: bash -eo pipefail -l {0}
40+
run: |
41+
nvm install --default ${{ matrix.node-version }}
42+
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
43+
nvm install --alias=npm 0.10
44+
nvm use ${{ matrix.node-version }}
45+
if [[ "$(npm -v)" == 1.1.* ]]; then
46+
nvm exec npm npm install -g [email protected]
47+
ln -fs "$(which npm)" "$(dirname "$(nvm which npm)")/npm"
48+
else
49+
sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")"
50+
fi
51+
npm config set strict-ssl false
52+
fi
53+
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
54+
55+
- name: Install Node.js dependencies
56+
run: npm install
57+
58+
- name: List environment
59+
id: list_env
60+
shell: bash
61+
run: |
62+
echo "node@$(node -v)"
63+
echo "npm@$(npm -v)"
64+
npm -s ls ||:
65+
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT"
66+
67+
- name: Run tests
68+
shell: bash
69+
run: |
70+
npm test

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

-3
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# basic-auth-connect [![Build Status](https://travis-ci.org/expressjs/basic-auth-connect.png)](https://travis-ci.org/expressjs/basic-auth-connect)
1+
# basic-auth-connect
22

33
Connect's Basic Auth middleware in its own module. This module is considered deprecated. You should instead create your own middleware with [basic-auth](https://github.com/visionmedia/node-basic-auth).
44

0 commit comments

Comments
 (0)