2023-01-20 01:09:13 +01:00
|
|
|
name: Inkycal testing
|
2020-05-16 08:22:57 +02:00
|
|
|
|
2023-01-20 01:09:13 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
2020-05-16 08:22:57 +02:00
|
|
|
jobs:
|
|
|
|
build:
|
2023-01-20 01:13:58 +01:00
|
|
|
name: run Inkycal tests
|
2020-05-16 08:22:57 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-03 17:39:55 +02:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2020-05-16 08:22:57 +02:00
|
|
|
|
|
|
|
steps:
|
2023-01-20 00:42:36 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-14 04:59:45 +02:00
|
|
|
- name: Set up Python 3.9
|
2023-01-20 00:42:36 +01:00
|
|
|
uses: actions/setup-python@v4
|
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-06-03 16:16:34 +02:00
|
|
|
git clone --single-branch https://github.com/aceinnolab/Inkycal
|
2023-06-03 17:26:31 +02:00
|
|
|
- name: Creating virtual environment generate docs and install dependencies
|
2023-06-03 17:39:55 +02:00
|
|
|
|
2020-05-16 08:22:57 +02:00
|
|
|
run: |
|
2020-06-17 14:54:48 +02:00
|
|
|
cd Inkycal
|
2023-06-03 16:24:26 +02:00
|
|
|
echo "$PWD"
|
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:38:45 +02:00
|
|
|
pip install wheel
|
|
|
|
pip install -e ./
|
2023-06-03 16:24:26 +02:00
|
|
|
cd docsource && make html
|
2023-06-03 17:23:34 +02:00
|
|
|
make github
|
|
|
|
cd ..
|
2023-06-03 17:51:05 +02:00
|
|
|
- name: Configure Git
|
|
|
|
run: |
|
|
|
|
git config --global user.name 'GitHub Actions'
|
|
|
|
git config --global user.email 'actions@github.com'
|
|
|
|
|
2023-06-03 17:39:55 +02:00
|
|
|
- name: Commit and Push Changes
|
2023-06-03 17:51:05 +02:00
|
|
|
run: |
|
|
|
|
cd docs/
|
|
|
|
git init
|
|
|
|
git add -A
|
|
|
|
git commit -m "Update documentation"
|
|
|
|
git push --force --quiet "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
|
2023-01-20 00:45:13 +01:00
|
|
|
- name: Setup test environment and run tests
|
2023-01-19 23:58:56 +01:00
|
|
|
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
|
2023-06-03 16:16:34 +02:00
|
|
|
wget https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/tests/settings.json
|
2020-06-17 14:54:48 +02:00
|
|
|
for f in *.py; do python3 "$f"; done
|