diff --git a/.github/workflows/step_tests-unit.yml b/.github/workflows/step_tests-unit.yml index dd431e2c..b3ea97d2 100644 --- a/.github/workflows/step_tests-unit.yml +++ b/.github/workflows/step_tests-unit.yml @@ -14,59 +14,63 @@ jobs: steps: - name: Checkout uses: actions/checkout@v7 - - - name: Install Go - uses: actions/setup-go@v6 with: - go-version: 1.26.x + persist-credentials: false + ref: ${{ github.event.pull_request.head.ref }} - - name: Setup clang - run: ./scripts/install_clang.sh + # - name: Install Go + # uses: actions/setup-go@v6 + # with: + # go-version: 1.26.x - - name: Run checkmetrics, checkrules and checkbpf - run: make checkmetrics checkrules checkbpf + # - name: Setup clang + # run: ./scripts/install_clang.sh - - name: Run unit tests for Go packages - run: make test + # - name: Run checkmetrics, checkrules and checkbpf + # run: make checkmetrics checkrules checkbpf - - name: Run unit tests for CGo packages - run: CGO_APPS=1 make test + # - name: Run unit tests for Go packages + # run: make test - - name: Merge coverage files - run: | - # Make global coverage report - make coverage + # - name: Run unit tests for CGo packages + # run: CGO_APPS=1 make test - # Remove testdata that contains too many files - rm -rf pkg/collector/testdata + # - name: Merge coverage files + # run: | + # # Make global coverage report + # make coverage - # Upstream package will not keep the format of README - # PR -> https://github.com/AlexBeauchemin/gobadge/pull/7 - # - name: Go Coverage Badge # Pass the `coverage.out` output to this action - # uses: tj-actions/coverage-badge-go@v2 - # with: - # filename: coverage.out - # link: https://github.com/mahendrapaipuri/ceems/actions/workflows/ci.yml?query=branch%3Amain + # # Remove testdata that contains too many files + # rm -rf pkg/collector/testdata - - name: Go coverage badge - run: | - # Install our custom badge updater - git clone https://github.com/mahendrapaipuri/gobadge - cd gobadge - go install . - cd .. + # # Upstream package will not keep the format of README + # # PR -> https://github.com/AlexBeauchemin/gobadge/pull/7 + # # - name: Go Coverage Badge # Pass the `coverage.out` output to this action + # # uses: tj-actions/coverage-badge-go@v2 + # # with: + # # filename: coverage.out + # # link: https://github.com/mahendrapaipuri/ceems/actions/workflows/ci.yml?query=branch%3Amain + + # - name: Go coverage badge + # run: | + # # Install our custom badge updater + # git clone https://github.com/mahendrapaipuri/gobadge + # cd gobadge + # go install . + # cd .. - # Create/Update badge - gobadge -target README.md -filename coverage.out -link https://github.com/ceems-dev/ceems/actions/workflows/ci.yml?query=branch%3Amain - gobadge -target website/docs/00-introduction.md -filename coverage.out -link https://github.com/ceems-dev/ceems/actions/workflows/ci.yml?query=branch%3Amain + # # Create/Update badge + # gobadge -target README.md -filename coverage.out -link https://github.com/ceems-dev/ceems/actions/workflows/ci.yml?query=branch%3Amain + # gobadge -target website/docs/00-introduction.md -filename coverage.out -link https://github.com/ceems-dev/ceems/actions/workflows/ci.yml?query=branch%3Amain - # Check diff on README - git diff README.md - git diff website/docs/00-introduction.md + # # Check diff on README + # git diff README.md + # git diff website/docs/00-introduction.md - name: Verify Changed files id: verify-changed-files run: | + echo "test" >> README.md # If there are no changes exit code will be 0 and 1 if there are changes if git diff --exit-code README.md website/docs/00-introduction.md > /dev/null; then echo "files_changed=false" >> $GITHUB_OUTPUT @@ -80,13 +84,13 @@ jobs: # to push the changes to remote - uses: actions/create-github-app-token@v3 id: app-token - if: steps.verify-changed-files.outputs.files_changed == 'true' && github.ref == 'refs/heads/main' + if: steps.verify-changed-files.outputs.files_changed == 'true' with: client-id: 4221824 private-key: ${{ secrets.app_private_key }} - name: Commit changes - if: steps.verify-changed-files.outputs.files_changed == 'true' && github.ref == 'refs/heads/main' + if: steps.verify-changed-files.outputs.files_changed == 'true' run: | git config --local user.email "bot@ceems.com" git config --local user.name "CEEMS Bot" @@ -94,8 +98,8 @@ jobs: git commit -m "chore: Updated coverage badge" -s - name: Push changes - if: steps.verify-changed-files.outputs.files_changed == 'true' && github.ref == 'refs/heads/main' + if: steps.verify-changed-files.outputs.files_changed == 'true' uses: ad-m/github-push-action@master with: github_token: ${{ steps.app-token.outputs.token }} - branch: ${{ github.head_ref }} + branch: "fix/ci/app-token-usage" diff --git a/README.md b/README.md index 82b47542..25d1da7f 100644 --- a/README.md +++ b/README.md @@ -228,3 +228,6 @@ If you want to say **thank you** or/and support active development of CEEMS: - Add a [GitHub Star](https://github.com/ceems-dev/ceems) to the project. - Write articles about project on [Dev.to](https://dev.to/), [Medium](https://medium.com/) or personal blog. +test +test +test