From d63a9075e994fae8c36ed1fa41f81e921ea0ba6e Mon Sep 17 00:00:00 2001 From: James Tansiri Date: Wed, 18 Dec 2024 14:34:20 +0700 Subject: [PATCH] ci-cd: add ci and update cd concurrency --- .github/workflows/deploy.yml | 5 ++++- .github/workflows/test.yml | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9513a13..bfc02ff 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,9 @@ on: jobs: deploy: runs-on: ubuntu-latest + concurrency: + group: deploy + cancel-in-progress: false steps: - name: Checkout code uses: actions/checkout@v2 @@ -13,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '16' + node-version: "16" - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f937a63 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +on: + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: "16" + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build