2021-05-20 04:12:03 +00:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DJANGO_SETTINGS_MODULE: babybuddy.settings.ci
|
2021-11-07 20:53:57 +00:00
|
|
|
PIPENV_VENV_IN_PROJECT: enabled
|
2021-05-20 04:12:03 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-13 14:11:42 +00:00
|
|
|
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10' ]
|
2021-05-20 04:12:03 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-11-13 14:31:29 +00:00
|
|
|
node-version: '14'
|
2021-05-20 04:12:03 +00:00
|
|
|
- run: npm install -g gulp-cli
|
|
|
|
- run: npm install
|
|
|
|
- name: Install pipenv
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pipenv wheel
|
2021-11-12 18:13:08 +00:00
|
|
|
# - name: Cache Python dependencies
|
|
|
|
# id: cache-pipenv
|
|
|
|
# uses: actions/cache@v2
|
|
|
|
# with:
|
|
|
|
# path: ./.venv
|
|
|
|
# key: ${{ runner.os }}-python-${{ matrix.python-version }}-pipenv-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
# restore-keys: |
|
|
|
|
# ${{ runner.os }}-python-${{ matrix.python-version }}-pipenv-
|
2021-05-20 04:12:03 +00:00
|
|
|
- name: Install dependencies
|
2021-11-12 18:13:08 +00:00
|
|
|
# if: steps.cache-pipenv.outputs.cache-hit != 'true'
|
2021-05-20 04:12:03 +00:00
|
|
|
run: |
|
2021-11-07 21:02:28 +00:00
|
|
|
pipenv install --dev
|
2021-05-20 04:12:03 +00:00
|
|
|
- run: gulp lint
|
|
|
|
- run: gulp coverage
|
|
|
|
- name: Submit results to Coveralls
|
|
|
|
uses: AndreMiras/coveralls-python-action@develop
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
flag-name: test-python-${{ matrix.python-version }}
|
|
|
|
parallel: true
|
|
|
|
coveralls_finish:
|
|
|
|
needs: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Coveralls Finished
|
|
|
|
uses: AndreMiras/coveralls-python-action@develop
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
parallel-finished: true
|
2022-05-28 20:13:38 +00:00
|
|
|
deploy-docs:
|
2022-05-28 20:30:27 +00:00
|
|
|
needs: test
|
2022-05-28 20:13:38 +00:00
|
|
|
name: Deploy docs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout main
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Deploy docs
|
|
|
|
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-05-28 20:27:36 +00:00
|
|
|
REQUIREMENTS: docs/requirements.txt
|
2022-05-09 22:41:42 +00:00
|
|
|
# deploy:
|
|
|
|
# needs: test
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v2
|
|
|
|
# - name: Deploy demo
|
|
|
|
# uses: akhileshns/heroku-deploy@v3.12.12
|
|
|
|
# with:
|
|
|
|
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
|
|
|
|
# heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
|
|
|
|
# heroku_email: ${{ secrets.HEROKU_EMAIL }}
|