Skip to content

Enforces secure chat improvements #1391

Enforces secure chat improvements

Enforces secure chat improvements #1391

Workflow file for this run

name: Tox test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tox-test:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup poetry
id: poetry_setup
uses: ItsDrike/setup-poetry@v1
with:
install-args: "--with workflow-tox --without lint"
python-version: "${{ matrix.python-version }}"
- name: Test with tox
shell: bash
run: poetry run tox
env:
PIP_USER: 0 # We want tox to use it's environments, not user installs
# Steps below are here to generate and upload an artifact from
# this workflow so that we can have the data about author and some
# other things accessible from the status_embed workflow.
# Prepare the pull request payload artifact. If this fails, we
# fail silently using the `continue-on-error` option, since failure
# doesn't mean that the checks in this workflow have failed.
- name: Prepare Pull Request Payload artifact
id: prepare-artifact
if: always() && github.event_name == 'pull_request'
continue-on-error: true
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
shell: bash
# This only makes sense if the previous step succeeded. To
# get the original outcome of the previous step before the
# `continue-on-error` conclusion is applied, we use the
# `.outcome` value. This step also fails silently.
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: pull-request-payload
path: pull_request_payload.json