Skip to content

Commit

Permalink
Bug 1686039 - Migrate from travis to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wlach committed Mar 11, 2021
1 parent 4f8f098 commit 5710dbe
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/python-package.yml
@@ -0,0 +1,42 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

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

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- 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
pip install -r requirements/all.txt
- name: Lint
run: |
./bin/lint-check.sh || (echo "Lint fix results:" && ./bin/lint-fix.sh && git diff && false)
bin/update-glean-documentation.sh
if [[ $(git diff docs/glean | head -c1 | wc -c) -ne 0 ]]; then echo "Unexpected glean changes! Please regenerate glean documentation via `./bin/update-glean-documentation.sh`." && false; fi
- name: Build and test
run: |
python gui/build.py bundle
ls -alh gui/mozregression-gui.tar.gz
coverage run -m pytest tests && mv .coverage .coverage.core
coverage run gui/build.py test && mv .coverage .coverage.gui
coverage combine
pip install coveralls; coveralls

0 comments on commit 5710dbe

Please sign in to comment.