Skip to content

Commit

Permalink
Switch GitHub workflow to dissect-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yunzheng committed Oct 11, 2024
1 parent 7e9f95e commit e9063a0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 104 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/dissect-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Dissect CI
on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:

jobs:
ci:
uses: fox-it/dissect-workflow-templates/.github/workflows/dissect-ci-template.yml@main
secrets: inherit

publish:
if: ${{ github.ref_name == 'main' || github.ref_type == 'tag' }}
needs: [ci]
runs-on: ubuntu-latest
environment: dissect_publish
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: packages
path: dist/
# According to the documentation, it automatically looks inside the `dist/` folder for packages.
- name: Publish package distributions to Pypi
uses: pypa/gh-action-pypi-publish@release/v1

trigger-tests:
needs: [publish]
uses: fox-it/dissect-workflow-templates/.github/workflows/dissect-ci-demand-test-template.yml@main
secrets: inherit
32 changes: 0 additions & 32 deletions .github/workflows/package.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/tests.yml

This file was deleted.

6 changes: 4 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ def test_request_error(beacon_x86_bconfig, httpserver: HTTPServer, caplog):

caplog.clear()
client.get_task()
assert "Connection refused" in caplog.text
errors = ["Connection refused", "WinError 10061"]
assert any(error in caplog.text for error in errors)

caplog.clear()
client.send_callback(*CallbackDebugMessage("hello"))
assert "Connection refused" in caplog.text
errors = ["Connection refused", "WinError 10061"]
assert any(error in caplog.text for error in errors)

0 comments on commit e9063a0

Please sign in to comment.