Skip to content

Fix the tests and polish the edge case of using obo to access obo end… #310

Fix the tests and polish the edge case of using obo to access obo end…

Fix the tests and polish the edge case of using obo to access obo end… #310

Workflow file for this run

name: Code Hygiene
on: [push, pull_request]
jobs:
linelint:
runs-on: ubuntu-latest
name: Check if all files end in newline
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Linelint
uses: fernandrone/linelint@0.0.4
spotless:
runs-on: ubuntu-latest
name: Spotless scan
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11
- uses: gradle/gradle-build-action@v2
with:
arguments: spotlessCheck
checkstyle:
runs-on: ubuntu-latest
name: Checkstyle scan
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11
- uses: gradle/gradle-build-action@v2
with:
arguments: checkstyleMain checkstyleTest
spotbugs:
runs-on: ubuntu-latest
name: Spotbugs scan
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11
- uses: gradle/gradle-build-action@v2
with:
arguments: spotbugsMain
check-permissions-order:
runs-on: ubuntu-latest
name: Check permissions orders
steps:
- uses: actions/checkout@v2
- run: npm install yaml
- name: Check permissions order
run: |
exclude_pattern="(^|/)roles_invalidxcontent.yml($|/)
(^|/)invalid_config/config.yml($|/)"
# Set pattern to exclude certain files
set -e
exit_code=0
for file in $(find . -name '*.yml' | grep -Ev "$exclude_pattern"); do
if ! node check-permissions-order.js "$file" --slient; then
exit_code=1
echo "Error: $file requires changes. Run the following command to fix:"
echo "node check-permissions-order.js $file --fix"
fi
done
exit $exit_code