Skip to content

Instantly share code, notes, and snippets.

@shubham-kshetre
Last active January 28, 2024 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shubham-kshetre/5bb5b2f8857157ab9d70e04a749b8e2c to your computer and use it in GitHub Desktop.
Save shubham-kshetre/5bb5b2f8857157ab9d70e04a749b8e2c to your computer and use it in GitHub Desktop.
name: Lint Checks
on:
merge_group:
types: [checks_requested]
push:
branches:
- develop
- release-*
pull_request:
branches:
- develop
- release-*
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
shard: ['other']
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build Docker images
run: make build
# - name: Merge pull request
# uses: ./.github/actions/merge/action.yml
- name: Third Party Size Check
if: startsWith(github.head_ref, 'update-changelog-for-release') == false
run: docker compose run --no-deps --entrypoint "/bin/sh -c 'git config --global --add safe.directory /app/oppia && python -m scripts.third_party_size_check $PYTHON_ARGS'" dev-server || make stop
- name: Run Lint Tests
if: startsWith(github.head_ref, 'update-changelog-for-release') == false
run: docker compose run --no-deps --entrypoint "/bin/sh -c 'git config --global --add safe.directory /app/oppia && python -m scripts.linters.pre_commit_linter $(PYTHON_ARGS)'" dev-server || make stop
- name: Report failure if failed on oppia/oppia develop branch
if: ${{ failure() && github.event_name == 'push' && github.repository == 'oppia/oppia' && github.ref == 'refs/heads/develop'}}
uses: ./.github/actions/send-webhook-notification
with:
message: "Lint checks failed on the upstream develop branch."
webhook-url: ${{ secrets.BUILD_FAILURE_ROOM_WEBHOOK_URL }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment