diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-19 20:22:48 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:54 +0100 |
commit | cb54876b76847920689b53ac939cf85b023ded31 (patch) | |
tree | f65cc98190cdc530792adffa43088a3c2fcb37b8 /.github/workflows/wee-slack.yml | |
parent | c08113b8900f2fc91a9fa1fa7d02229478452a7a (diff) | |
download | wee-slack-cb54876b76847920689b53ac939cf85b023ded31.tar.gz |
Check that script loads in WeeChat in CI
Diffstat (limited to '.github/workflows/wee-slack.yml')
-rw-r--r-- | .github/workflows/wee-slack.yml | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/.github/workflows/wee-slack.yml b/.github/workflows/wee-slack.yml index 7decad2..9baf5ba 100644 --- a/.github/workflows/wee-slack.yml +++ b/.github/workflows/wee-slack.yml @@ -2,7 +2,7 @@ name: wee-slack on: [push, pull_request] jobs: - build: + test: if: > github.event_name == 'push' || ( github.event_name == 'pull_request' && @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] @@ -31,8 +32,33 @@ jobs: - run: poetry run pytest tests + build: + if: > + github.event_name == 'push' || ( + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name != github.repository + ) + + needs: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install WeeChat, tmux and python3-websocket + run: | + sudo apt-get update + sudo apt-get install weechat-headless tmux python3-websocket + - run: ./build.sh + - name: Load slack.py in WeeChat + run: | + WEECHAT_DIR=$(mktemp -d) + tmux new-session -d "weechat-headless --dir $WEECHAT_DIR -r '/script load $PWD/build/slack.py; /quit'" + while pidof -q tmux; do :; done + cat $WEECHAT_DIR/logs/core.weechat.weechatlog + grep -q 'python: registered script "slack"' $WEECHAT_DIR/logs/core.weechat.weechatlog + - uses: actions/upload-artifact@v3 with: name: slack.py |