From 11aaa65761eeacbe28d60e8c910ebadcd22028c8 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Tue, 20 Dec 2022 16:24:40 +0100 Subject: [PATCH] Fix review points --- .github/workflows/basic-validation.yml | 17 +++++++++++++++++ .github/workflows/check-dist.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .../workflows/{workflow.yml => e2e-tests.yml} | 8 ++------ .github/workflows/licensed.yml | 2 +- __tests__/verify-no-unstaged-changes.sh | 7 ------- package.json | 2 +- 7 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/basic-validation.yml rename .github/workflows/{workflow.yml => e2e-tests.yml} (96%) delete mode 100755 __tests__/verify-no-unstaged-changes.sh diff --git a/.github/workflows/basic-validation.yml b/.github/workflows/basic-validation.yml new file mode 100644 index 0000000..5e5029a --- /dev/null +++ b/.github/workflows/basic-validation.yml @@ -0,0 +1,17 @@ +name: Basic validation + +on: + pull_request: + paths-ignore: + - '**.md' + push: + branches: + - main + - releases/* + paths-ignore: + - '**.md' + +jobs: + call-basic-validation: + name: Basic validation + uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main \ No newline at end of file diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index d51766a..1251c11 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -12,6 +12,6 @@ on: workflow_dispatch: jobs: - call-check-dist: # The reusable workflow can be found here: https://github.com/actions/reusable-workflows/blob/main/.github/workflows/check-dist.yml + call-check-dist: name: Check dist/ uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index fd4d859..f1f430a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,6 +9,6 @@ on: - cron: '0 3 * * 0' jobs: - call-codeQL-analysis: # The reusable workflow can be found here: https://github.com/actions/reusable-workflows/blob/main/.github/workflows/codeql-analysis.yml + call-codeQL-analysis: name: CodeQL analysis uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main \ No newline at end of file diff --git a/.github/workflows/workflow.yml b/.github/workflows/e2e-tests.yml similarity index 96% rename from .github/workflows/workflow.yml rename to .github/workflows/e2e-tests.yml index 8f7ea55..b6cda4c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/e2e-tests.yml @@ -1,4 +1,4 @@ -name: Main workflow +name: e2e tests on: pull_request: @@ -12,10 +12,6 @@ on: - '**.md' jobs: - call-basic-validation: # The reusable workflow can be found here: https://github.com/actions/reusable-workflows/blob/main/.github/workflows/basic-validation.yml - name: Basic validation - uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main - test-setup-multiple-versions: runs-on: ${{ matrix.operating-system }} strategy: @@ -324,4 +320,4 @@ jobs: env: NUGET_AUTH_TOKEN: NOTATOKEN - name: Verify dotnet - run: __tests__/verify-dotnet.sh 3.1.201 + run: __tests__/verify-dotnet.sh 3.1.201 \ No newline at end of file diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 06eae1e..42084b2 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -10,6 +10,6 @@ on: workflow_dispatch: jobs: - call-licensed: # The reusable workflow can be found here: https://github.com/actions/reusable-workflows/blob/main/.github/workflows/licensed.yml + call-licensed: name: Licensed uses: actions/reusable-workflows/.github/workflows/licensed.yml@main \ No newline at end of file diff --git a/__tests__/verify-no-unstaged-changes.sh b/__tests__/verify-no-unstaged-changes.sh deleted file mode 100755 index 15efefe..0000000 --- a/__tests__/verify-no-unstaged-changes.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then - echo "Detected uncommitted changes after build. See status below:" - git diff - exit 1 -fi diff --git a/package.json b/package.json index fde3dd6..b1cd563 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "tsc && ncc build", "format": "prettier --write **/*.ts", "format-check": "prettier --check **/*.ts", - "lint": "", + "lint": "echo \"Fake command that does nothing. It is used in reusable workflows\"", "prepare": "husky install", "test": "jest --coverage --config ./jest.config.js", "update-installers": "nwget https://dot.net/v1/dotnet-install.ps1 -O externals/install-dotnet.ps1 && nwget https://dot.net/v1/dotnet-install.sh -O externals/install-dotnet.sh"