Skip to content

Commit

Permalink
add basic github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Nickurak committed Aug 13, 2024
1 parent 959fc9c commit aab3cfe
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/detect-fixups.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Ukechords fixup detections

on: [pull_request]

jobs:
flag-fixups:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch target branch
env:
BASE: ${{ github['base_ref'] }}
run: git fetch --no-tags origin +refs/heads/${BASE}:refs/remotes/origin/${BASE}
- name: Fetch source branch
env:
HEAD: ${{ github['head_ref'] }}
run: git fetch --no-tags origin +refs/heads/${HEAD}:refs/remotes/origin/${HEAD}
- name: flag missing fixup/squash commits
env:
BASE: origin/${{ github['base_ref'] }}
HEAD: origin/${{ github['head_ref'] }}
run: tests/flag-autosquash "$BASE" "$HEAD"
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ukechords test execution

on: [pull_request,push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: setup flit
run: pip install flit
- name: install ukechords
run: flit install --extras dev
- name: Run flake8
run: flake8 .
- name: Run pylint
run: pylint . --recursive=yes
- name: Run mypy
run: mypy .
- name: Run tests
run: pytest .

0 comments on commit aab3cfe

Please sign in to comment.