# CI: lint and format check. Runs on every PR and every push to main. when: - event: pull_request - branch: main event: push steps: - name: install image: node:22-alpine commands: - corepack enable - corepack prepare pnpm@10.29.2 --activate - pnpm install --frozen-lockfile - name: Prettier Format Check image: node:22-alpine commands: - corepack enable - corepack prepare pnpm@10.29.2 --activate - pnpm install --frozen-lockfile - pnpm format:check depends_on: - install - name: Send Prettier Format Check Status Notification (failure) image: curlimages/curl environment: MATTERMOST_BOT_ACCESS_TOKEN: from_secret: mattermost_bot_access_token MATTERMOST_CHANNEL_ID: from_secret: mattermost_tests_channel_id MATTERMOST_POST_API_URL: from_secret: mattermost_post_api_url commands: - | BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Prettier Format Check failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER") curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL depends_on: - Prettier Format Check when: - status: [failure] - name: Lint Check image: node:22-alpine commands: - corepack enable - corepack prepare pnpm@10.29.2 --activate - pnpm install --frozen-lockfile - pnpm lint depends_on: - install - name: Send Lint Status Notification (failure) image: curlimages/curl environment: MATTERMOST_BOT_ACCESS_TOKEN: from_secret: mattermost_bot_access_token MATTERMOST_CHANNEL_ID: from_secret: mattermost_tests_channel_id MATTERMOST_POST_API_URL: from_secret: mattermost_post_api_url commands: - | BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Lint failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER") curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL depends_on: - Lint Check when: - status: [failure] - name: Build image: node:22-alpine commands: - corepack enable - corepack prepare pnpm@10.29.2 --activate - pnpm install --frozen-lockfile - pnpm build depends_on: - install - name: Send Build Status Notification (failure) image: curlimages/curl environment: MATTERMOST_BOT_ACCESS_TOKEN: from_secret: mattermost_bot_access_token MATTERMOST_CHANNEL_ID: from_secret: mattermost_tests_channel_id MATTERMOST_POST_API_URL: from_secret: mattermost_post_api_url commands: - | BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Build failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER") curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL depends_on: - Build when: - status: [failure] - name: Send CI Pipeline Status Notification (success) image: curlimages/curl environment: MATTERMOST_BOT_ACCESS_TOKEN: from_secret: mattermost_bot_access_token MATTERMOST_CHANNEL_ID: from_secret: mattermost_tests_channel_id MATTERMOST_POST_API_URL: from_secret: mattermost_post_api_url commands: - | BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] CI pipeline success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER") curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL depends_on: - install - Prettier Format Check - Lint Check - Build when: - status: [success]