Skip to content

fixes issues 65 and 66 #215

fixes issues 65 and 66

fixes issues 65 and 66 #215

Workflow file for this run

name: Python package - build, test and release
on: [push, pull_request]
jobs:
build:
name: Build Job
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Install aiortc native dependencies
run: |
sudo apt-get update
sudo apt-get install libavdevice-dev libavfilter-dev libopus-dev libvpx-dev pkg-config
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install python package locally
run: |
python -m pip install --upgrade pip
pip install --editable src
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
pytest
release-test:
name: Release Test Job
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Run Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- name: Semantic release completed
run: echo Semantic release flow completed
release-prod:
name: Release to Official Repo
needs: [release-test]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Run Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- name: Semantic release completed
run: echo Semantic release flow completed