From 1e8727d99985084738c7db7fb83936bc0dadf699 Mon Sep 17 00:00:00 2001 From: Alexander Kadyrov Date: Thu, 28 Nov 2024 01:56:07 +0400 Subject: [PATCH 1/2] Optimize CI workflows --- .github/workflows/docker-image.yml | 2 +- .github/workflows/lint.yml | 20 -------------------- .github/workflows/spell.yml | 5 ++++- .github/workflows/tests.yml | 15 ++++++++++----- 4 files changed, 15 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 193f454..471850f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: hadolint/hadolint-action@v1.5.0 + - uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: Dockerfile diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 32614e6..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Lint - -on: [push, pull_request] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v3 - with: - node-version: 22.11.0 - cache: npm - - - name: Prepare .env - run: cp .env.example .env - - - run: npm ci - - run: make lint diff --git a/.github/workflows/spell.yml b/.github/workflows/spell.yml index fdaaefc..5401c61 100644 --- a/.github/workflows/spell.yml +++ b/.github/workflows/spell.yml @@ -2,7 +2,10 @@ name: Spell -on: [push, pull_request] +on: + pull_request: + branches: + - master jobs: codespell: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9246c7a..7c9bce4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,9 +1,12 @@ -name: Tests +name: Lint and Tests -on: [push, pull_request] +on: + pull_request: + branches: + - master jobs: - test: + lint_and_test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -13,8 +16,10 @@ jobs: node-version: 22.11.0 cache: npm - - run: npm install - - run: npm run test:coverage + - run: cp .env.example .env + - run: npm ci + - run: make lint + - run: make coverage - name: Upload coverage report uses: actions/upload-artifact@v3 From 343e343bf7edae26d1f79652c78de950b25244d6 Mon Sep 17 00:00:00 2001 From: Alexander Kadyrov Date: Thu, 28 Nov 2024 02:05:22 +0400 Subject: [PATCH 2/2] Bump upload-artifact to v4 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7c9bce4..15c1527 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - run: make coverage - name: Upload coverage report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-report path: coverage/lcov-report