From 320956ecfd39ca2688f8357311dc3da0c2b601e8 Mon Sep 17 00:00:00 2001 From: Halstein Tonheim Date: Mon, 27 Oct 2025 09:27:03 +0100 Subject: [PATCH] Steps vs Jobs --- .github/workflows/build.yml | 2 +- .github/workflows/steps-vs-jobs.yml | 38 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/steps-vs-jobs.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3fddf5..7ead2bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,4 +19,4 @@ run: npm ci - name: Build - run: npm run build \ No newline at end of file + run: npm run build diff --git a/.github/workflows/steps-vs-jobs.yml b/.github/workflows/steps-vs-jobs.yml new file mode 100644 index 0000000..e1fb402 --- /dev/null +++ b/.github/workflows/steps-vs-jobs.yml @@ -0,0 +1,38 @@ + name: Build on PR + on: + # This workflow will only run for pull requests targeting the main branch + pull_request: + branches: + - main + + jobs: + build: + name: Build Project + runs-on: ubuntu-latest + steps: + # Remember we have to check out the repository first! + - name: Checkout repository + uses: actions/checkout@v5 + + # This step installs the dependencies + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + test: + name: Test Project + runs-on: ubuntu-latest + steps: + # Remember we have to check out the repository first! + - name: Checkout repository + uses: actions/checkout@v5 + + # This step installs the dependencies + - name: Install dependencies + run: npm ci + + - name: Build + run: npm test +