Skip to content

Mark helion automatically #8151

Mark helion automatically

Mark helion automatically #8151

Workflow file for this run

name: torchci
on:
pull_request:
paths:
- "torchci/**"
- "tools/torchci/**"
- ".github/workflows/torchci.yml"
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: torchci
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: yarn install --frozen-lockfile
- run: yarn lint
- name: Run yarn format
run: |
set -euox pipefail
# Sometimes installing makes some changes and we don't want to mix it
# up with the yarn format result
git stash push -k -u -m pre-format
yarn format
if ! git diff --quiet; then
echo "❌ Formatting issues found. See the git diff below"
git --no-pager diff --color
echo -e "\033[31mERROR:\033[0m Please run '\033[33myarn format\033[0m' from the /torchci dir. If it doesn't work, run 'yarn install' and try again."
exit 1
fi
git stash pop "stash^{/pre-format}" || true
- name: yarn prettier --check .
run: |
# This should be a noop since the yarn format step should catch it but
# leaving it just in case
yarn prettier --check . || (echo -e "\033[31mERROR:\033[0m Please run '\033[33myarn format\033[0m' from the /torchci dir. If it doesn't work, run 'yarn install' and try again." && exit 1)
- run: yarn tsc
- run: yarn test
python-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools/torchci
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: |
pip3 install --upgrade pip
pip3 install -r requirements.txt
pip3 install -e .
pytest tests