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
|
2020-11-30 12:43:08 +01:00
|
|
|
|
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
|
|
|
|
|
2022-09-08 22:26:20 +02:00
|
|
|
- name: Install dependencies
|
2022-04-14 05:45:20 +02:00
|
|
|
run: |
|
|
|
|
pip install wheel
|
|
|
|
pip install -e ./
|
2020-06-17 14:54:48 +02:00
|
|
|
cd inkycal/modules && ls -al
|
2022-09-08 22:26:20 +02:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
env:
|
|
|
|
OPENWEATHERMAP_API_KEY: secrets.OPENWEATHERMAP_API_KEY
|
|
|
|
|
|
|
|
run: |
|
2020-06-17 14:54:48 +02:00
|
|
|
cd ..
|
|
|
|
cd tests
|
2022-04-14 17:17:18 +02:00
|
|
|
wget https://raw.githubusercontent.com/aceisace/Inkycal/assets/tests/settings.json
|
2022-09-08 22:26:20 +02:00
|
|
|
# sed -i 's/"api_key":.*/"api_key": "${{secrets.OPENWEATHERMAP_API_KEY}}",/' settings.json
|
2020-06-17 14:54:48 +02:00
|
|
|
for f in *.py; do python3 "$f"; done
|