PR builder test (#66) #118
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: Test pushed code | |
on: | |
push: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r requirements-dev.txt -r requirements.txt | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics *.py | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 --count --exit-zero --max-complexity=10 --statistics *.py | |
- name: Simple posting test | |
env: | |
SLOSHY_EMAIL: ${{secrets.SLOSHY_EMAIL}} | |
SLOSHY_PASSWORD: ${{secrets.SLOSHY_PASSWORD}} | |
run: | |
python sloshy.py test-pushed.yaml "Github Actions Push test" | |
- name: Generate config file for tests from production config | |
run: | |
python make-test-yaml.py | |
- name: Check availability of all rooms | |
env: | |
SLOSHY_EMAIL: ${{secrets.SLOSHY_EMAIL}} | |
SLOSHY_PASSWORD: ${{secrets.SLOSHY_PASSWORD}} | |
run: | |
python sloshy.py room-test.yaml --test-rooms | |
- name: Announce presence in any new rooms | |
env: | |
SLOSHY_EMAIL: ${{secrets.SLOSHY_EMAIL}} | |
SLOSHY_PASSWORD: ${{secrets.SLOSHY_PASSWORD}} | |
run: | | |
python sloshy.py room-test.yaml \ | |
--announce "Sloshy is here! (See profile for details)" | |
- name: Clean up config file after tests | |
run: | |
rm room-test.yaml |