Update patch version 1.3.6 #131
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
# Copyright (c) 2023-present, FriendliAI Inc. All rights reserved. | |
name: Friendli CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.py" | |
- "poetry.lock" | |
- "pyproject.toml" | |
- "tox.ini" | |
pull_request: | |
paths: | |
- "**.py" | |
- "poetry.lock" | |
- "pyproject.toml" | |
- "tox.ini" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Delete unnecessary directories to secure disk capacity. | |
run: | | |
rm -rf /usr/share/dotnet | |
rm -rf /opt/ghc | |
rm -rf /opt/hostedtoolcache | |
- name: Set up Python ${{ matrix.python-version }} | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set virtual env | |
run: | | |
python -m venv env | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: env | |
key: pf-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
source env/bin/activate | |
poetry install | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
- name: Install tox | |
run: | | |
source env/bin/activate | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: Run lint | |
run: | | |
source env/bin/activate | |
tox run -e lint | |
- name: Run tests | |
run: | | |
source env/bin/activate | |
tox run |