Updated python-app.yml (Test #2) #7
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: | |
push: | |
branches: [ "main", "tejas3070-patch-1" ] | |
#pull_request: | |
#branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: tejas3070-patch-1 | |
path: 'triton_viz' | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Cache Python virtual environment and pip cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/venv | |
~/.cache/pip | |
key: ${{ runner.os }}-venv-${{ hashFiles('triton_viz/**/requirements.txt', 'triton_viz/**.py', 'triton_viz/**/setup.py') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-venv-${{ hashFiles('triton_viz/**/requirements.txt', 'triton_viz/**.py', 'triton_viz/**/setup.py') }}- | |
${{ runner.os }}-venv- | |
- name: Create and activate virtual environment | |
run: | | |
python -m venv ~/venv | |
source ~/venv/bin/activate | |
- name: Upgrade pip | |
run: | | |
pip install --upgrade pip | |
- name: Clone and install dependency project (e.g., triton) | |
run: | | |
git clone https://github.com/openai/triton.git ~/triton | |
cd ~/triton/python | |
MAX_JOBS=16 pip install . | |
- name: Install triton_viz | |
run: | | |
cd $GITHUB_WORKSPACE/triton_viz | |
pip install . | |
- name: Install main project (triton_viz) dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Lint with pre-commit | |
run: | | |
pre-commit run --all-files | |
- name: Test with pytest | |
run: | | |
pytest Examples |