Skip to content

Commit

Permalink
Merge pull request #70 from alertlogic/fixes
Browse files Browse the repository at this point in the history
Fix local workflows and pagerduty alert + add ability to run manually
  • Loading branch information
james-bellamy authored Aug 2, 2023
2 parents 6ec73c1 + 47b4f52 commit 973ddfa
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build python distribution
on:
pull_request:
workflow_call:
workflow_dispatch:

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build and sign windows artifacts
on:
pull_request:
workflow_call:
workflow_dispatch:

jobs:
build:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ on:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/run_tests
uses: ./.github/workflows/run_tests.yml
release:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on:
- created
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/run_tests
uses: ./.github/workflows/run_tests.yml
release:
runs-on: windows-latest
steps:
- uses: ./.github/workflows/build_windows
secrets: inherit
- name: Upload Release executable setup
id: upload-exe-asset
uses: actions/upload-release-asset@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Run Tests
on:
workflow_call:
pull_request:
workflow_dispatch:

jobs:
test:
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/scheduled_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,24 @@ name: Run Scheduled Tests
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Run every day at 12:00 UTC
- cron: '00 12 * * *'
# Run every day at 16:00 UTC
- cron: '00 16 * * *'
workflow_dispatch:

jobs:
test_code:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/run_tests
uses: ./.github/workflows/run_tests.yml
test_python_build:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/build_python
uses: ./.github/workflows/build_python.yml
test_windows_build:
runs-on: windows-latest
steps:
- uses: ./.github/workflows/build_windows
uses: ./.github/workflows/build_windows.yml
secrets: inherit
alert:
runs-on: ubuntu-latest
needs: [test_code, test_python_build, test_windows_build]
if: failure()
steps:
- name: Run Tests
- name: Alert Pager Duty of Failure
run: |
curl --request POST \
--url https://events.pagerduty.com/v2/enqueue \
Expand All @@ -35,7 +32,6 @@ jobs:
"source": "https://github.com/alertlogic/alcli"
},
"routing_key": "551f474142b44702c00f0861398f614a",
"dedup_key": "alcli_failure",
"event_action": "trigger",
"links": [
{
Expand Down

0 comments on commit 973ddfa

Please sign in to comment.