-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get github actions working for both pull requests and pushes based on h…
- Loading branch information
1 parent
1ddb626
commit 2c7bebf
Showing
4 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
15 changes: 4 additions & 11 deletions
15
.github/workflows/test.yml → .github/workflows/format.yaml
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 |
---|---|---|
@@ -1,31 +1,24 @@ | ||
--- | ||
name: Validate CSV | ||
name: Format CSVs | ||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
test-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- run: pip install -r linters/requirements.txt | ||
- run: python linters/autoformat-csv.py | ||
- run: python linters/lint-csv.py | ||
- run: python linters/format.py | ||
- run: python linters/validate.py | ||
- run: | | ||
git config user.name 'Jon Banafato' | ||
git config user.email 'jonafato@users.noreply.github.com' | ||
git diff --quiet || git commit -am "Autoformat CSV" | ||
git diff --quiet || git commit -am "Autoformat CSVs" | ||
git push |
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 @@ | ||
--- | ||
name: Validate CSVs | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
test-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- run: pip install -r linters/requirements.txt | ||
- run: python linters/validate.py |
File renamed without changes.
File renamed without changes.