Skip to content

Commit

Permalink
(chore): update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-bot authored Mar 21, 2024
1 parent 64f1611 commit 8702774
Showing 1 changed file with 41 additions and 9 deletions.
50 changes: 41 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
name: Publish SDK

# Only trigger, when the test workflow succeeds
on:
push:
branches:
- main
name: ci

on: [push]
jobs:
compile:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Compile
run: poetry run mypy .
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: |
poetry install
- name: Test
run: poetry run pytest .
env:
ELEVEN_API_KEY: ${{ secrets.TEST_API_KEY }}

publish:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.event.workflow_run.conclusion == 'success'
needs: [compile, test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.7
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
Expand Down

0 comments on commit 8702774

Please sign in to comment.