Bump ruff from 0.0.290 to 0.7.2 #104
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "slackbot/tests/**" | |
- "README.md" | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: false | |
name: CI | |
jobs: | |
lint: | |
name: Lint | |
runs-on: [self-hosted, small] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
run: python -m pip install --upgrade poetry==1.6.1 | |
- name: Config poetry | |
run: poetry config virtualenvs.create false | |
- name: Install dependencies | |
run: poetry install --only main,dev --no-interaction --no-ansi --no-cache | |
working-directory: ./slack_bot | |
- name: Lint | |
run: ruff . | |
working-directory: ./ | |
type_checking: | |
name: Static type checking | |
runs-on: [ self-hosted, small ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
run: python -m pip install --upgrade poetry==1.6.1 | |
- name: Config poetry | |
run: poetry config virtualenvs.create false | |
- name: Install dependencies | |
run: poetry install --only main,dev --no-interaction --no-ansi --no-cache | |
working-directory: ./slack_bot | |
- name: Lint | |
run: mypy . | |
working-directory: ./ | |
deploy: | |
name: Deploy | |
needs: | |
- lint | |
- type_checking | |
runs-on: [self-hosted, small] | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: hyperskill.azurecr.io/hyperskill | |
username: ${{ secrets.AZ_REGISTRY_USERNAME }} | |
password: ${{ secrets.AZ_REGISTRY_PASSWORD }} | |
- name: Build | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: hyperskill.azurecr.io/hyperskill/dataslackbot:${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha | |
- name: Set up Helm | |
uses: ./.github/workflows/actions/helm | |
with: | |
resource_group: ${{ vars.RESOURCE_GROUP }} | |
cluster_name: ${{ vars.CLUSTER_NAME }} | |
client_id: ${{ secrets.CLIENT_ID }} | |
client_secret: ${{ secrets.CLIENT_SECRET }} | |
subscription_id: ${{ secrets.SUBSCRIPTION_ID }} | |
tenant_id: ${{ secrets.TENANT_ID }} | |
- name: Deploy | |
run: | | |
helm upgrade data-slack-bot ./deploy/slack_bot \ | |
--namespace data-slack-bot \ | |
--install \ | |
--wait \ | |
--atomic \ | |
--set image.tag=${{ github.sha }} \ | |
--set image.dockerConfigJson=${{ secrets.DOCKER_CONFIG_JSON }} \ | |
--set slack.appToken=${{ secrets.SLACK_APP_TOKEN }} \ | |
--set slack.botToken=${{ secrets.SLACK_BOT_TOKEN }} \ | |
--set openai.oaiToken=${{ secrets.OPENAI_API_KEY }} \ | |
--set hyperskillai.apiKey=${{ secrets.HYPERSKILLAI_API_KEY }} \ | |
--set youtrack.apiToken=${{ secrets.YT_API_TOKEN }} \ | |
--set clickhouse.host=${{ secrets.CLICKHOUSE_HOST }} \ | |
--set clickhouse.host_url=${{ secrets.CLICKHOUSE_HOST_URL }} \ | |
--set clickhouse.user=${{ secrets.CLICKHOUSE_USER }} \ | |
--set clickhouse.pass=${{ secrets.CLICKHOUSE_PASSWORD }} \ | |
--set airflow.user=${{ secrets.AIRFLOW_USER }} \ | |
--set airflow.pass=${{ secrets.AIRFLOW_PASSWORD }} \ | |
--set airflow.custom_dag_url=${{ secrets.AIRFLOW_CUSTOM_DAG_URL }} |