Skip to content

Commit

Permalink
specify branches in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ejm714 committed Sep 29, 2021
1 parent 15c7133 commit e61cd62
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: tests

on:
push:
branches: [master]
pull_request:
branches:
- v2
- master

jobs:
code-quality:
name: Code Quality
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -e .[cpu,dev]
- name: Lint package
run: |
make lint
tests:
name: Test suite (${{ matrix.os }}, Python ${{ matrix.python-version }})
needs: code-quality
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2

- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v1
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -e .[dev]
- name: Run tests
run: |
make tests
test-install:
name: Install and CLI test (non-editable install)
needs: tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]

steps:
- uses: actions/checkout@v2

- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v1
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install package (non-editable)
run: |
python -m pip install --upgrade pip setuptools
pip install .
- name: Run zamba CLI to ensure proper install
run: |
zamba --help

0 comments on commit e61cd62

Please sign in to comment.