-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from Mouwf/feature/add-ci-workflow
GitHub ActionsでCIをできるようにした
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Continuous Integration Pipeline | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
build_node_18: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: develop | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Run npm audit | ||
run: npm audit --production --audit-level=moderate | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Jest tests | ||
env: | ||
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | ||
run: npm run test:all | ||
build_node_20: | ||
needs: build_node_18 | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: develop | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: 'npm' | ||
- name: Run npm audit | ||
run: npm audit --production --audit-level=moderate | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Jest tests | ||
env: | ||
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | ||
run: npm run test:all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Node.js Unit Tests | ||
on: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: develop | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Unit Tests | ||
env: | ||
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | ||
run: npm run test |