diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..79f4abe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: nodejs/package-lock.json + + - name: Install dependencies + working-directory: nodejs + run: npm ci + + - name: Run lint + working-directory: nodejs + run: npm run lint + + - name: Build + working-directory: nodejs + run: npm run build + + - name: Run tests + working-directory: nodejs + env: + HACKMD_ACCESS_TOKEN: "test_token_123456789" + run: npm test \ No newline at end of file