Sync transactions from Nubank to my YNAB(You Need A Budget) every 4 hours #3968
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync transactions from Nubank to my YNAB(You Need A Budget) every 4 hours | |
on: | |
schedule: | |
- cron: 0 */4 * * * # Every 4 hours | |
push: | |
branches: | |
- trunk | |
jobs: | |
sync: | |
env: | |
YNAB_TOKEN: ${{ secrets.YNAB_TOKEN }} | |
CPF: ${{ secrets.CPF }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
PATH_TO_CERTIFICATE: ${{ secrets.PATH_TO_CERTIFICATE }} | |
NUBANK_CERTIFICATE: ${{ secrets.NUBANK_CERTIFICATE }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
# Setup Python (faster than using Python container) | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Install pipenv | |
run: | | |
python -m pip install --upgrade pipenv wheel | |
- id: cache-pipenv | |
uses: actions/cache@v1 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | |
- name: Install dependencies | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: | | |
pipenv install --dev | |
- name: Run test suite | |
run: | | |
pipenv run pytest | |
- name: Run sync from nubank to ynab | |
run: | | |
pipenv run make run |