diff --git a/.github/workflows/detect-fixups.yml b/.github/workflows/detect-fixups.yml new file mode 100644 index 0000000..fedf816 --- /dev/null +++ b/.github/workflows/detect-fixups.yml @@ -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" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..38ce1aa --- /dev/null +++ b/.github/workflows/test.yml @@ -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 .