-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from nathan-weinberg/initial-ci
Implement initial CI integrations
- Loading branch information
Showing
20 changed files
with
1,093 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# GitHub Dependabot configuration file | ||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "docker" | ||
directory: "/.github/workflows" | ||
schedule: | ||
interval: "daily" | ||
|
||
# Maintain dependencies for Python scripts | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Since dependabot cannot update workflows using docker, | ||
# we use this indirection since dependabot can update this file. | ||
FROM rhysd/actionlint:1.7.1@sha256:435ecdb63b1169e80ca3e136290072548c07fc4d76a044cf5541021712f8f344 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Lint GitHub Actions workflows | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- '.github/workflows/*.ya?ml' | ||
- '.github/workflows/actionlint.*' # This workflow | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- '.github/workflows/*.ya?ml' | ||
- '.github/workflows/actionlint.*' # This workflow | ||
|
||
env: | ||
LC_ALL: en_US.UTF-8 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Harden Runner" | ||
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0 | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
|
||
- name: "Checkout" | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Download actionlint" | ||
run: | | ||
docker build --tag actionlint - < .github/workflows/actionlint.dockerfile | ||
- name: "Check workflow files" | ||
run: | | ||
echo "::add-matcher::.github/workflows/matchers/actionlint.json" | ||
docker run --volume="${PWD}:/repo" --workdir=/repo actionlint -color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Lint Markdown documents | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- '**/*.md' | ||
- '.markdownlint-cli2.yaml' | ||
- '.github/workflows/docs.yml' # This workflow | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- '**/*.md' | ||
- '.markdownlint-cli2.yaml' | ||
- '.github/workflows/docs.yml' # This workflow | ||
|
||
env: | ||
LC_ALL: en_US.UTF-8 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
markdown-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Harden Runner" | ||
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0 | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
- name: "Checkout" | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Check Markdown documents" | ||
uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 # v16.0.0 | ||
with: | ||
globs: '**/*.md' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "actionlint", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Spellcheck | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- '**.md' | ||
- '.github/workflows/spellcheck.yml' # This workflow | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- '**.md' | ||
- '.github/workflows/spellcheck.yml' # This workflow | ||
|
||
env: | ||
LC_ALL: en_US.UTF-8 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
spellcheck: | ||
name: Spellcheck (en_US) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Harden Runner" | ||
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0 | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
|
||
- name: "Checkout" | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Spellcheck | ||
uses: rojopolis/spellcheck-github-actions@e36f662b21ead3f6f29794ac5c35069bf236463c # v0.37.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,7 @@ venv/ | |
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
dictionary.dic | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config: | ||
line-length: false | ||
no-emphasis-as-header: false | ||
first-line-heading: false | ||
code-block-style: false | ||
no-duplicate-header: false | ||
single-trailing-newline: false | ||
globs: | ||
- "**/*.md" | ||
ignores: | ||
- ".github/**" | ||
- "venv/**" | ||
- ".venv/**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
repos: | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.11.5 | ||
hooks: | ||
- id: isort | ||
exclude: imports | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.3.4 | ||
hooks: | ||
# Run the linter (most fixers are disabled for now). | ||
- id: ruff | ||
# Run the formatter. | ||
- id: ruff-format |
Oops, something went wrong.