Skip to content

PR builder: add GH_TOKEN #121

PR builder: add GH_TOKEN

PR builder: add GH_TOKEN #121

Workflow file for this run

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