From 5c6493b86b56d50f6d49ce01548b682a443fdfd6 Mon Sep 17 00:00:00 2001 From: ngchongpeng Date: Sun, 18 Aug 2024 21:54:50 +0800 Subject: [PATCH] Commit changes. --- .github/workflows/ci.yml | 68 ++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9404428..50694bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,56 +1,42 @@ -name: Continuous Integration Workflow +name: Continuous integration workflow -# This workflow is triggered whenever a new PR is created on the main branch on: pull_request: branches: - main - paths: - - 'web/**' - push: - branches: - - main - paths: - - 'web/**' + +defaults: + run: + shell: bash + working-directory: ./web jobs: - # Run unit tests to make sure everything is 👍 test: - name: 'Run unit tests' - defaults: - run: - shell: bash - # Define the working directory for all run steps in the workflow - working-directory: ./web - # Specify the OS we want the workflow to run on + name: Run unit tests runs-on: ubuntu-latest - # Define the steps for this job steps: - - uses: actions/checkout@v2 - name: 'Checkout repository' - - name: 'Install Dependencies' - run: npm install - - - name: 'Run Tests' - run: npm run test + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm run test - # Run the linter to check for code style issues lint: - name: 'Run linter' - defaults: - run: - shell: bash - # Define the working directory for all run steps in the workflow - working-directory: ./web + name: Run linter runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - name: 'Checkout repository' - - - name: 'Install Dependencies' - run: npm install - - - name: 'Run Linter' - run: npx standard -v + steps: + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install dependencies + run: npm install + + - name: Run linter + run: npx standard -v + \ No newline at end of file