Skip to content

ciを作成。現在はnpm testをするだけ #1

ciを作成。現在はnpm testをするだけ

ciを作成。現在はnpm testをするだけ #1

Workflow file for this run

name: Run tests

Check failure on line 1 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

(Line: 20, Col: 14): Unexpected value '', (Line: 21, Col: 9): Unexpected value 'node-version'
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest #通常はubuntu-latestにすることが多い、ubuntuはLinuxを用いたOSの一つで、ci/cd時にもよく使われる
steps:
- name: checkout repository
uses: actions/checkout@v4 #v3だと古い
- name: Use Node.js
uses: actions/setup-node@v7 #v4は2024年ごろの主流
with:
node-version: '24'
- name: create ci environment
run: npm ci
- name: build package
run: npm run build
- name: run tests
run: npm test