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
|
2023-06-03 19:03:09 +02:00
|
|
|
|
2020-05-16 08:22:57 +02:00
|
|
|
jobs:
|
2023-06-03 19:53:42 +02:00
|
|
|
clone-setup-install:
|
|
|
|
name: Clone, Setup, and Install
|
2020-05-16 08:22:57 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-06-03 19:53:42 +02:00
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Clone Repo
|
|
|
|
run: git clone https://github.com/aceinnolab/Inkycal
|
|
|
|
|
2023-06-03 19:03:09 +02:00
|
|
|
- name: Set up Python 3.9
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
2020-06-17 14:54:48 +02:00
|
|
|
|
2023-06-03 19:53:42 +02:00
|
|
|
- name: Install Dependencies
|
2023-06-03 19:03:09 +02:00
|
|
|
run: |
|
2023-06-03 19:53:42 +02:00
|
|
|
cd Inkycal
|
|
|
|
python3 -m venv venv
|
|
|
|
source venv/bin/activate
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install wheel
|
|
|
|
pip install -e ./
|
2023-06-03 17:39:55 +02:00
|
|
|
|
2023-06-03 19:53:42 +02:00
|
|
|
test:
|
|
|
|
name: Run Tests
|
|
|
|
needs: clone-setup-install
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Clone repo
|
|
|
|
run: git clone https://github.com/aceinnolab/Inkycal
|
|
|
|
|
|
|
|
- name: Run Tests
|
2023-06-03 19:03:09 +02: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 }}
|
|
|
|
run: |
|
2023-06-03 19:53:42 +02:00
|
|
|
cd Inkycal/inkycal/tests
|
2023-06-03 19:35:20 +02:00
|
|
|
wget https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/tests/settings.json
|
|
|
|
for f in *.py; do python3 "$f"; done
|
2023-06-03 19:53:42 +02:00
|
|
|
|
|
|
|
generate-docs:
|
|
|
|
name: Generate Docs
|
|
|
|
needs: clone-setup-install
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Clone Repo
|
|
|
|
run: git clone https://github.com/aceinnolab/Inkycal
|
|
|
|
|
|
|
|
- name: Generate Docs
|
|
|
|
run: |
|
|
|
|
cd Inkycal/docsource
|
|
|
|
make html
|
|
|
|
|
|
|
|
publish-docs:
|
|
|
|
name: Publish Docs
|
|
|
|
needs: generate-docs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Clone Repo
|
|
|
|
run: git clone https://github.com/aceinnolab/Inkycal
|
|
|
|
|
|
|
|
- name: Publish Docs
|
|
|
|
run: |
|
|
|
|
cd Inkycal
|
2023-06-03 19:03:09 +02:00
|
|
|
git config --global user.name 'GitHub Actions'
|
|
|
|
git config --global user.email 'actions@github.com'
|
2023-06-03 19:09:36 +02:00
|
|
|
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
2023-06-03 19:53:42 +02:00
|
|
|
cp -R docsource/_build/html/. docs/
|
2023-06-03 19:03:09 +02:00
|
|
|
git add docs
|
|
|
|
git commit -m "Update documentation"
|
2023-06-03 19:53:42 +02:00
|
|
|
git push --force --quiet
|