Skip to content

Commit

Permalink
correct cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
diberry committed Apr 19, 2024
1 parent dca0a6e commit da508fe
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,40 @@ name: Build and Test
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]



jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]

steps:
- uses: actions/checkout@v4

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}


- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test
- name: Run tests
run: npm test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This is a basic Express.js server used for JS Dev Experience documentation, in p
npm install
```

1. Environment for port
1. Configure environment variable name for port in `./src/index.js`.

* Azure App Service on Linux: process.env.WEB_PORT
* Azure App Service on Windows native: process.env.PORT
Expand Down

0 comments on commit da508fe

Please sign in to comment.