From 192af764ec841ef34b1d6efda1ad8580a7ae465e Mon Sep 17 00:00:00 2001 From: Yoichiro Tanaka Date: Sun, 30 Jun 2024 11:05:28 +0900 Subject: [PATCH] Add a new workflow for continuous integration on GitHub Actions. --- .github/workflows/pull-request.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pull-request.yaml diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml new file mode 100644 index 0000000..b0d9795 --- /dev/null +++ b/.github/workflows/pull-request.yaml @@ -0,0 +1,24 @@ +name: Build for Pull Request +on: + pull_request: + types: [opened, synchronize] +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + - name: Build and Test + run: npm run build && npm run test