Skip to content

Commit

Permalink
CI action for testing/mutant productivity/taxes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejkrzywda committed Mar 25, 2024
1 parent 10aeb9a commit 7722f39
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: todo
on:
push:
pull_request:
types: [opened, reopened]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
env:
WORKING_DIRECTORY: productivity/todo
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby-3.2.0
bundler-cache: true
working-directory: ${{ env.WORKING_DIRECTORY }}
- run: make test
working-directory: ${{ env.WORKING_DIRECTORY }}
- uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
attachments: [{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text: `${process.env.AS_WORKFLOW}/${process.env.AS_JOB} ${{ job.status }} in ${process.env.AS_TOOK}\n${process.env.AS_COMMIT} in ${process.env.AS_REF}`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.CI_WEBHOOK }}
if: always()
continue-on-error: true

mutate:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
env:
WORKING_DIRECTORY: productivity/todo
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby-3.2.0
bundler-cache: true
working-directory: ${{ env.WORKING_DIRECTORY }}
- run: make mutate
working-directory: ${{ env.WORKING_DIRECTORY }}
- uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
attachments: [{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text: `${process.env.AS_WORKFLOW}/${process.env.AS_JOB} ${{ job.status }} in ${process.env.AS_TOOK}\n${process.env.AS_COMMIT} in ${process.env.AS_REF}`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.CI_WEBHOOK }}
if: always()
continue-on-error: true

0 comments on commit 7722f39

Please sign in to comment.