Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed May 23, 2024
1 parent 18f5e06 commit 5379044
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 27 deletions.
11 changes: 2 additions & 9 deletions .github/actions/slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<EOF\n$MESSAGE\nEOF" >> $GITHUB_ENV
- run: echo "${{ inputs.message }}"
shell: bash

- uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_BOT_TOKEN: ${{ inputs.token }}
Expand All @@ -37,7 +30,7 @@ runs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ env.MESSAGE }}"
"text": "${{ inputs.message }}"
}
}
]
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit 5379044

Please sign in to comment.