-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separates CI workflows in two different flows: - one dedicated to manifest verification - the other to mods verification. The idea is to avoid running mods verification if manifesto checking fails.
- Loading branch information
Showing
5 changed files
with
58 additions
and
44 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,31 @@ | ||
name: Manifest check | ||
on: [workflow_call] # allow this workflow to be called from other workflows | ||
|
||
jobs: | ||
check-for-tabs-in-json: | ||
name: Check for tabulations | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check JSON files for tabs | ||
run: | | ||
set -e | ||
for file in $(find . -type f -name '*.json'); do | ||
if grep --perl-regexp --quiet '\t' "$file"; then | ||
echo "Error: JSON file $file contains tabs." | ||
exit 1 | ||
fi | ||
done | ||
verify-json-validation: | ||
name: Run JSON schema validation | ||
needs: check-for-tabs-in-json | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Validate package.json against local schema | ||
uses: cardinalby/schema-validator-action@v3 | ||
with: | ||
file: 'verified-mods.json' | ||
schema: '.github/schema.json' |
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: Mods verification | ||
on: [workflow_call] # allow this workflow to be called from other workflows | ||
|
||
jobs: | ||
verify-mods-versions: | ||
name: Try and fetch mod versions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Run mod checks | ||
run: | | ||
python .github/verify_versions.py |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
name: VerifiedMods | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
manifest-checking: | ||
name: Manifest check | ||
uses: ./.github/workflows/manifest-check.yml | ||
mods-verification: | ||
name: Mod verification | ||
needs: [manifest-checking] | ||
uses: ./.github/workflows/mods-verification.yml |