Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

refactor: ci #20

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
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
13 changes: 0 additions & 13 deletions .github/workflows/black.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/isort.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Forked from https://github.com/psf/black/blob/main/.github/workflows/lint.yml
name: Lint

on: [push, pull_request]

jobs:
build:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Assert PR target is main
if: github.event_name == 'pull_request' && github.repository == 'psf/black'
run: |
if [ "$GITHUB_BASE_REF" != "main" ]; then
echo "::error::PR targeting '$GITHUB_BASE_REF', please refile targeting 'main'." && exit 1
fi

- name: Set up latest Python
uses: actions/setup-python@v4
with:
python-version: "*"

- name: black
uses: psf/black@stable
with:
options: "--check --verbose"
src: "./youtube_bz ./tests"

- name: isort
uses: isort/isort-action@v1
with:
configuration: "--check-only --diff --profile=black"
5 changes: 4 additions & 1 deletion .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: Pyright
on: [push, pull_request]

jobs:
pyright:
build:
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/python-test.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Test

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Test Python Package

on: [push]
on: [push, pull_request]

jobs:
pytest:
test:
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
Expand Down