Skip to content

fix: try, add: noneflow testing actions,release: 0.1.11 #1

fix: try, add: noneflow testing actions,release: 0.1.11

fix: try, add: noneflow testing actions,release: 0.1.11 #1

Workflow file for this run

name: NoneFlow
on:
push:
branches:
- main
- "refs/tags/*"
concurrency:
group: ${{ github.workflow }}-${{ github.run_id }}
cancel-in-progress: false
jobs:
check:
runs-on: ubuntu-latest
name: check
if: |
!(
github.event.pull_request &&
(
github.event.pull_request.head.repo.fork ||
!(
contains(github.event.pull_request.labels.*.name, 'Plugin') ||
contains(github.event.pull_request.labels.*.name, 'Adapter') ||
contains(github.event.pull_request.labels.*.name, 'Bot')
)
)
)
steps:
- run: echo "Check passed"
plugin_test:
runs-on: ubuntu-latest
name: nonebot2 plugin test
needs: check
permissions:
issues: read
outputs:
result: ${{ steps.plugin-test.outputs.RESULT }}
output: ${{ steps.plugin-test.outputs.OUTPUT }}
metadata: ${{ steps.plugin-test.outputs.METADATA }}
steps:
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Test Plugin
id: plugin-test
run: |
curl -sSL https://github.com/nonebot/noneflow/releases/latest/download/plugin_test.py | python -
noneflow:
runs-on: ubuntu-latest
name: noneflow
needs: plugin_test
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: .cache/.pre-commit
key: noneflow-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: NoneFlow
uses: docker://ghcr.io/nonebot/noneflow:latest
with:
config: >
{
"base": "master",
"plugin_path": "assets/plugins.json",
"bot_path": "assets/bots.json",
"adapter_path": "assets/adapters.json"
}
env:
PLUGIN_TEST_RESULT: ${{ needs.plugin_test.outputs.result }}
PLUGIN_TEST_OUTPUT: ${{ needs.plugin_test.outputs.output }}
PLUGIN_TEST_METADATA: ${{ needs.plugin_test.outputs.metadata }}
PRE_COMMIT_HOME: /github/workspace/.cache/.pre-commit
- name: Fix permission
run: sudo chown -R $(whoami):$(id -ng) .cache/.pre-commit