diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..43c7417e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,45 @@ +name: Lint + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + checks: write + contents: write + +jobs: + lint: + name: Run linters + runs-on: sel2-5 + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: 20 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.12 + - name: Install Node (frontend) dependencies + working-directory: ./frontend + run: npm ci + - name: Install Python linting (backend) dependencies + run: pip install autopep8 + + - name: Run Frontend linters + working-directory: ./frontend + run: | + npm run dev linte + npm run dev format:check + + - name: Run Backend linter + run: autopep8 -rd --exit-code backend +