Inkycal/.github/workflows/tests.yml

44 lines
1.1 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:
2023-01-11 23:13:00 +01:00
2020-05-16 08:22:57 +02:00
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: |
2023-01-19 23:58:56 +01:00
git clone --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
2023-01-11 23:13:00 +01:00
2023-01-11 22:21:46 +01:00
- name: Install dependencies
2022-09-08 22:26:20 +02:00
run: |
2023-01-11 23:13:00 +01:00
echo "$PWD"
2022-09-08 22:38:45 +02:00
pip install wheel
pip install -e ./
2023-01-11 22:21:46 +01:00
2023-01-19 23:58:56 +01:00
- name: Setup test environment and run tests
env:
OPENWEATHERMAP_API_KEY: ${{ secrets.OPENWEATHERMAP_API_KEY }}
SAMPLE_ICAL_URL: ${{ secrets.SAMPLE_ICAL_URL }}
TEST_ICAL_URL: ${{ secrets.TEST_ICAL_URL }}
TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}
2023-01-11 22:21:46 +01:00
run: |
2023-01-11 22:27:51 +01:00
cd inkycal/tests
wget https://raw.githubusercontent.com/aceisace/Inkycal/assets/tests/settings.json
2020-06-17 14:54:48 +02:00
for f in *.py; do python3 "$f"; done