55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 23
|
|
cache: 'pnpm'
|
|
|
|
- name: Install pnpm dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run eslint
|
|
run: pnpm run eslint
|
|
|
|
- name: Verify swagger API specification
|
|
run: |
|
|
bundle exec rake swagger:build
|
|
if [[ `git status swagger/swagger.json --porcelain` ]]
|
|
then
|
|
echo "ERROR: The swagger.json file is not in sync with the yaml specification. Run 'rake swagger:build' and commit 'swagger/swagger.json'."
|
|
exit 1
|
|
fi
|
|
mkdir -p ~/tmp
|
|
curl -L https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar > ~/tmp/openapi-generator-cli-6.3.0.jar
|
|
java -jar ~/tmp/openapi-generator-cli-6.3.0.jar validate -i swagger/swagger.json
|
|
|
|
- name: Bundle audit
|
|
run: bundle exec bundle audit update && bundle exec bundle audit check -v
|
|
|
|
- name: Rubocop
|
|
run: bundle exec rubocop --parallel
|