From 0d62e5114f5781ba2dd7e6f71457f44b9b635b7e Mon Sep 17 00:00:00 2001 From: Deniz Deli Date: Wed, 4 Dec 2024 14:50:26 +0100 Subject: [PATCH] Add frontend tests to github actions Signed-off-by: Deniz Deli --- .github/workflows/ci_test2.yml | 13 ------- .github/workflows/frontend_test_pipeline.yml | 37 ++++++++++++++++++++ 2 files changed, 37 insertions(+), 13 deletions(-) delete mode 100644 .github/workflows/ci_test2.yml create mode 100644 .github/workflows/frontend_test_pipeline.yml diff --git a/.github/workflows/ci_test2.yml b/.github/workflows/ci_test2.yml deleted file mode 100644 index 668bc02..0000000 --- a/.github/workflows/ci_test2.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: CI Test 2 - -on: - push: - branches: - - dev - -jobs: - hello: - runs-on: ubuntu-latest - steps: - - name: Hello World - run: echo "CI Test 2" diff --git a/.github/workflows/frontend_test_pipeline.yml b/.github/workflows/frontend_test_pipeline.yml new file mode 100644 index 0000000..25fea88 --- /dev/null +++ b/.github/workflows/frontend_test_pipeline.yml @@ -0,0 +1,37 @@ +name: Frontend Tests + +# Trigger on push to dev and on pull request creation, excluding "deliverables" folder +on: + push: + branches: + - dev + paths-ignore: + - 'deliverables/**' + pull_request: + branches: + - dev + paths-ignore: + - 'deliverables/**' + +jobs: + test: + runs-on: ubuntu-latest + + steps: + # Step 1: Checkout the code + - name: Checkout code + uses: actions/checkout@v3 + + # Step 2: Set up Node.js environment + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + # Step 3: Install dependencies + - name: Install dependencies + run: npm ci + + # Step 4: Run tests + - name: Run tests + run: npx nx run metadata-analyzer-frontend:test