Inkycal/.github/workflows/tests.yml

41 lines
1.0 KiB
YAML
Raw Normal View History

2020-06-17 14:54:48 +02:00
name: Python application
2020-05-16 08:22:57 +02:00
2020-06-17 14:54:48 +02:00
on: [push]
2020-05-16 08:22:57 +02:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2020-06-17 14:54:48 +02:00
- uses: actions/checkout@v1
2022-04-14 04:59:45 +02:00
- name: Set up Python 3.9
2020-06-17 14:54:48 +02:00
uses: actions/setup-python@v1
2020-05-16 08:22:57 +02:00
with:
2022-04-14 04:59:45 +02:00
python-version: 3.9
2020-06-17 14:54:48 +02:00
- name: Clone repo
2020-05-16 08:22:57 +02:00
run: |
2022-04-14 04:58:49 +02:00
git clone --branch feature/venv --single-branch https://github.com/aceisace/Inkycal
2022-04-14 05:45:20 +02:00
- name: Creating virtual evvironment
2020-05-16 08:22:57 +02:00
run: |
2020-06-17 14:54:48 +02:00
cd Inkycal
2022-04-14 05:45:20 +02:00
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
- name: Downloading settings.json file
run: |
wget https://raw.githubusercontent.com/aceisace/Inkycal/assets/tests/settings.json
- name: Install dependencies and run
run: |
pip install wheel
pip install -e ./
2020-06-17 14:54:48 +02:00
cd inkycal/modules && ls -al
cd ..
cd tests
2022-04-14 16:24:53 +02:00
sed -i '' 's/secret_key =.*/secret_key = "${{secrets.OPENWEATHERMAP_API_KEY}}"/' inkycal_weather_test.py
2020-06-17 14:54:48 +02:00
for f in *.py; do python3 "$f"; done