Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 30 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test

on:
push:
pull_request:
branches: [ main ]

jobs:

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

reqtest:
todraft:
runs-on: ubuntu-latest

steps:

- name: Set PR to draft
if: ${{ github.event.pull_request.draft == false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo $GITHUB_EVENT_PATH
cat $GITHUB_EVENT_PATH
curl -X PATCH \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-d '{"draft": true}' \
$(jq -r '.pull_request.url' <$GITHUB_EVENT_PATH)

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.10"]
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

reqtest:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: test draft
if: ${{ github.event.pull_request.draft == true }}
run: echo "The draft"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: test fair
if: ${{ github.event.pull_request.draft == false }}
run: echo "The fair"

- name: test
run: echo ${{ github.event.pull_request.draft }}

- name: requirements test
run: |
python -m pip install -U pip
python -m pip install -r requirements.txt