Skip to content

Commit

Permalink
[ci] enforce yamllint checks (fixes #195) (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Nov 2, 2023
1 parent 9255ec6 commit 7cda052
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 24 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Report a bug
description: Describe a situation where `pydistcheck` behaves differently than expected.
title: "[bug] "
Expand All @@ -23,7 +24,8 @@ body:
description: |
Please provide enough information for others investigating this report
to reproduce the behavior you observed.
For help, see the advice in ["How to Create a Minimal, Reproducible Example"](https://stackoverflow.com/help/minimal-reproducible-example).
For help, see the advice in
["How to Create a Minimal, Reproducible Example"](https://stackoverflow.com/help/minimal-reproducible-example).
validations:
required: true
- type: input
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Request some other new feature
description: Request some feature other than "a new check.
title: "[feature request] "
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Request a new check
description: Request that `pydistcheck` complain about something it doesn't complain about today.
title: "[new check] "
Expand Down
1 change: 1 addition & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
categories:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-and-publish-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
name: build-and-publish-to-pypi

# build wheels and push to PyPI whenever a GitHub release is published
on:
push:
branches:
- build/*
- build/*
pull_request:
branches:
- build/*
- build/*
release:
types:
- published
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name: docs

on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

jobs:
test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-run.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: manual-run

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: release-drafter

on:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name: smoke-tests

on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main
# run every Wednesday at midnight UTC
schedule:
- cron: '0 0 * * 3'
Expand Down Expand Up @@ -54,9 +55,9 @@ jobs:
if: always()
runs-on: ubuntu-latest
needs:
- test
- test
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
8 changes: 5 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name: static-analysis

on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

jobs:
lint:
Expand All @@ -29,7 +30,8 @@ jobs:
requests \
ruff \
shellcheck \
types-requests
types-requests \
yamllint
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
shfmt
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name: unit-tests

on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

jobs:
test-cpython:
Expand Down Expand Up @@ -148,11 +149,11 @@ jobs:
if: always()
runs-on: ubuntu-latest
needs:
- test-cpython
- test-pypy
- check-test-packages
- test-cpython
- test-pypy
- check-test-packages
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2
build:
os: "ubuntu-20.04"
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ lint:
ruff check .
mypy ./src
mypy ./tests/data
yamllint \
--strict \
-d '{extends: default, rules: {truthy: {check-keys: false}, line-length: {max: 120}}}' \
.

.PHONY: linux-wheel
linux-wheel:
Expand Down
1 change: 1 addition & 0 deletions docs/env.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: pydistscheck-docs
channels:
- nodefaults
Expand Down

0 comments on commit 7cda052

Please sign in to comment.