Skip to content

Check project standards #1

Check project standards

Check project standards #1

name: Check project standards
on: [workflow_call, workflow_dispatch]
jobs:
check-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
- run: test -f requirements.txt && pip install -r requirements.txt && python -m flake8 && python -m black
check-cloudformation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
- name: cfn-lint
run: |
test -f requirements.txt \
&& grep --quiet "cfn-lint" requirements.txt \
&& pip install -r requirements.txt \
&& find . -name "*.yml" -type f ! -path "*/node_modules/*" ! -path "./vendor/bundle/*" ! -path "./.github/*" -mindepth 2 -print0 | xargs -0 -n1 cfn-lint --ignore-checks E3008 --template
check-ruby:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: test -f Gemfile && bundle exec standardrb
check-javascript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: |
test -f yarn.lock \
&& yarn install \
&& npm exec prettier -- --check "**/*.{json,yml}" \
&& npm exec eslint -- "**/*.js" \
&& npm exec tsc