Skip to content

chore(deps): update docker.io/mattermost/mattermost-preview docker tag to v10 #2925

chore(deps): update docker.io/mattermost/mattermost-preview docker tag to v10

chore(deps): update docker.io/mattermost/mattermost-preview docker tag to v10 #2925

Workflow file for this run

name: build
on:
create:
tags:
- v*
push:
branches:
- main
pull_request:
schedule:
# At 00:00 on Monday
- cron: '0 0 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
env:
# renovate: datasource=pypi depName=pre-commit versioning=pep440
PRE_COMMIT_VERSION: 3.5.0
# renovate: datasource=github-releases depName=astral-sh/uv
UV_VERSION: 0.4.18
jobs:
test:
name: test - python ${{ matrix.python-version }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@c9aa747934b6867b18bf8f6624a8929c4f76147b # v3.1.4
with:
enable-cache: true
cache-suffix: ${{ env.pythonLocation }}
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.UV_VERSION }}
- name: Set up Mattermost instance
run: tests/scripts/setup-mattermost.sh
- name: Install dependencies
run: uv sync --frozen
- name: Run tests
run: >-
uv run pytest
--color=yes
--cov
--cov-report="xml:coverage-reports/coverage-${PYTHON_VERSION}.xml"
env:
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Archive coverage report
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: coverage-reports-${{ matrix.python-version }}
path: coverage-reports/coverage-${{ matrix.python-version }}.xml
lint:
name: lint - python ${{ matrix.python-version }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@c9aa747934b6867b18bf8f6624a8929c4f76147b # v3.1.4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.UV_VERSION }}
- name: Set up pre-commit cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: uvx "pre-commit@${PRE_COMMIT_VERSION}" run --show-diff-on-failure --color=always --all-files
sonar-scan:
name: sonar scan
needs: [test]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
timeout-minutes: 15
steps:
# Full checkout for SonarQube
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Download coverage reports
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: coverage-reports-*
path: coverage-reports/
merge-multiple: true
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@eb211723266fe8e83102bac7361f0a05c3ac1d1b # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
publish:
name: publish
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: [lint, test, sonar-scan]
runs-on: ubuntu-latest
environment:
name: PyPI
url: https://pypi.org/project/mmemoji
permissions:
contents: read
id-token: write
timeout-minutes: 15
env:
PYTHON_VERSION: '3.12'
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@c9aa747934b6867b18bf8f6624a8929c4f76147b # v3.1.4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.UV_VERSION }}
- name: Build
run: uv build
- name: Publish to PyPi
run: uv publish