From 53790448154adfaddc364b084d6ffef438b37435 Mon Sep 17 00:00:00 2001 From: Tony Hsu Date: Fri, 24 May 2024 01:32:48 +0200 Subject: [PATCH] WIP --- .github/actions/slack/action.yml | 11 ++-------- .github/workflows/test.yml | 36 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/actions/slack/action.yml b/.github/actions/slack/action.yml index 1a1c253..527fc87 100644 --- a/.github/actions/slack/action.yml +++ b/.github/actions/slack/action.yml @@ -16,15 +16,8 @@ inputs: runs: using: "composite" steps: - - id: prepare_message - run: | - MESSAGE="${{ inputs.message }}" - MESSAGE="${MESSAGE//'%'/'%25'}" - MESSAGE="${MESSAGE//$'\n'/'\\n'}" - MESSAGE="${MESSAGE//$'\r'/'%0D'}" - printf "MESSAGE<> $GITHUB_ENV + - run: echo "${{ inputs.message }}" shell: bash - - uses: slackapi/slack-github-action@v1.26.0 env: SLACK_BOT_TOKEN: ${{ inputs.token }} @@ -37,7 +30,7 @@ runs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ env.MESSAGE }}" + "text": "${{ inputs.message }}" } } ] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7803eba..8f38ebd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,10 +19,10 @@ jobs: matrix: ruby_version: - '3.3' - - '3.2' - - '3.1' - - '3.0' - - '2.7' + # - '3.2' + # - '3.1' + # - '3.0' + # - '2.7' steps: - uses: actions/checkout@v4 - name: Ruby version @@ -31,17 +31,17 @@ jobs: run: gem -v - name: Bundler version run: bundle -v - - name: Install dependencies - run: bundle install - - name: Run tests - run: bundle exec rake spec - - name: Run tests with ITR - env: - DD_CIVISIBILITY_AGENTLESS_ENABLED: true - DD_CIVISIBILITY_ITR_ENABLED: true - DD_API_KEY: ${{ secrets.DD_API_KEY }} - DD_ENV: ci - run: bundle exec rake spec + # - name: Install dependencies + # run: bundle install + # - name: Run tests + # run: bundle exec rake spec + # - name: Run tests with ITR + # env: + # DD_CIVISIBILITY_AGENTLESS_ENABLED: true + # DD_CIVISIBILITY_ITR_ENABLED: true + # DD_API_KEY: ${{ secrets.DD_API_KEY }} + # DD_ENV: ci + # run: bundle exec rake spec notify: needs: test @@ -53,9 +53,9 @@ jobs: uses: ./.github/actions/slack with: message: > - :tada: Tests passed! - Branch: ${{ github.ref }} - Commit: ${{ github.sha }} + :tada: Tests passed!\\n + Branch: ${{ github.ref }}\\n + Commit: ${{ github.sha }}\\n Workflow: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} channel: ${{ vars.SLACK_CHANNEL_ID }} token: ${{ secrets.SLACK_BOT_TOKEN }}