From dcc170299d23836948bfc34af06d6ec78141e297 Mon Sep 17 00:00:00 2001 From: Halstein Tonheim Date: Mon, 27 Oct 2025 10:22:01 +0100 Subject: [PATCH 1/3] Artifacts demo --- .github/workflows/artifacts-demo.yml | 77 ++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/artifacts-demo.yml diff --git a/.github/workflows/artifacts-demo.yml b/.github/workflows/artifacts-demo.yml new file mode 100644 index 0000000..98351e5 --- /dev/null +++ b/.github/workflows/artifacts-demo.yml @@ -0,0 +1,77 @@ +name: Artifacts Demo + +on: + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: npm install + + - name: Run build + run: npm run build + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-files + path: dist/ + retention-days: 5 + + test: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: npm install + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-files + path: dist/ + + - name: Run tests + run: npm test + + - name: Upload coverage report + uses: actions/upload-artifact@v4 + if: always() + with: + name: coverage-report + path: coverage/ + retention-days: 30 + + report: + runs-on: ubuntu-latest + needs: [build, test] + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-files + path: dist/ + + - name: Download coverage report + uses: actions/download-artifact@v4 + with: + name: coverage-report + path: coverage/ + + - name: List build artifacts + run: ls -la dist/ + + - name: List coverage artifacts + run: ls -la coverage/ + + - name: Print success message + run: echo "Build and test artifacts successfully collected" + From 147a9958e7586d1131640103f17902080e3660b5 Mon Sep 17 00:00:00 2001 From: Halstein Tonheim Date: Mon, 27 Oct 2025 10:36:06 +0100 Subject: [PATCH 2/3] Try to get the coverage report generated --- .github/workflows/artifacts-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/artifacts-demo.yml b/.github/workflows/artifacts-demo.yml index 98351e5..8a01404 100644 --- a/.github/workflows/artifacts-demo.yml +++ b/.github/workflows/artifacts-demo.yml @@ -40,7 +40,7 @@ jobs: path: dist/ - name: Run tests - run: npm test + run: npm test:full-report - name: Upload coverage report uses: actions/upload-artifact@v4 From 5fc328f3ace21a10f13da31017c12d7196725b4f Mon Sep 17 00:00:00 2001 From: Halstein Tonheim Date: Mon, 27 Oct 2025 10:38:17 +0100 Subject: [PATCH 3/3] Try to get the coverage report generated --- .github/workflows/artifacts-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/artifacts-demo.yml b/.github/workflows/artifacts-demo.yml index 8a01404..65556df 100644 --- a/.github/workflows/artifacts-demo.yml +++ b/.github/workflows/artifacts-demo.yml @@ -40,7 +40,7 @@ jobs: path: dist/ - name: Run tests - run: npm test:full-report + run: npm run test:full-report - name: Upload coverage report uses: actions/upload-artifact@v4