Build #698
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
--- | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
# Python Checks | |
python-checks: | |
runs-on: "ubuntu-latest" | |
name: Python Checks | |
steps: | |
- name: Check out the repository | |
uses: actions/[email protected] | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Install requirements | |
run: | | |
pip install pip | |
pip install -r requirements_dev.txt | |
- name: Run pre-commit on all files | |
run: | | |
pre-commit run --all-files --show-diff-on-failure --color=always | |
python-tests: | |
runs-on: ubuntu-latest | |
name: Python Tests | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@master | |
with: | |
node-version: 16.x | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Flutter env | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Build | |
run: make | |
- name: Run tests | |
run: docker run --rm --entrypoint=python3 swatch:latest -u -m unittest | |
- name: Run mypy | |
run: docker run --rm --entrypoint=/bin/bash swatch:latest -c "pip3 install -r /requirements_dev.txt; mypy --install-types; mypy --config-file swatch/mypy.ini swatch" | |
web-checks: | |
runs-on: ubuntu-latest | |
name: Web Checks | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Flutter env | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
web-tests: | |
runs-on: ubuntu-latest | |
name: Web Tests | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Flutter env | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Run test | |
working-directory: ./web | |
run: flutter test |