mirror of https://github.com/snachodog/mybuddy.git
Update actions configurations; re-add Python cache
This commit is contained in:
parent
815d881eeb
commit
544babd8eb
|
@ -9,40 +9,30 @@ on:
|
|||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DJANGO_SETTINGS_MODULE: babybuddy.settings.ci
|
||||
PIPENV_VENV_IN_PROJECT: enabled
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/share/virtualenvs
|
||||
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('**/requirements.txt') }}
|
||||
- name: Install Python dependencies
|
||||
- run: |
|
||||
python -m pip install --upgrade pipenv wheel
|
||||
pipenv install --dev
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
- run: npm install -g gulp-cli
|
||||
- run: npm install
|
||||
- name: Install pipenv
|
||||
run: |
|
||||
python -m pip install --upgrade pipenv wheel
|
||||
# - 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-
|
||||
- name: Install dependencies
|
||||
# if: steps.cache-pipenv.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
pipenv install --dev
|
||||
- run: gulp lint
|
||||
- run: gulp coverage
|
||||
- run: |
|
||||
npm install -g gulp-cli
|
||||
npm install
|
||||
gulp lint
|
||||
gulp coverage
|
||||
- name: Submit results to Coveralls
|
||||
uses: AndreMiras/coveralls-python-action@develop
|
||||
with:
|
||||
|
@ -66,12 +56,11 @@ jobs:
|
|||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v2
|
||||
|
||||
uses: actions/checkout@v3
|
||||
- name: Deploy docs
|
||||
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.github_token }}
|
||||
REQUIREMENTS: docs/requirements.txt
|
||||
# deploy:
|
||||
# needs: test
|
||||
|
|
|
@ -10,8 +10,6 @@ jobs:
|
|||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PIPENV_VENV_IN_PROJECT: enabled
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
@ -22,21 +20,24 @@ jobs:
|
|||
language: [ 'javascript', 'python' ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
python3 -m pip install --upgrade pipenv wheel
|
||||
pipenv install
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/share/virtualenvs
|
||||
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('**/requirements.txt') }}
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
languages: ${{ matrix.language }}
|
||||
setup-python-dependencies: false
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pipenv wheel
|
||||
pipenv install
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
|
|
@ -8,10 +8,10 @@ jobs:
|
|||
name: Reset
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: '3.x'
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/share/virtualenvs
|
||||
|
@ -22,7 +22,7 @@ jobs:
|
|||
run: pipenv install
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "16"
|
||||
node-version: '16'
|
||||
- name: Install Railway CLI
|
||||
run: npm i -g @railway/cli
|
||||
- name: Reset demo database
|
||||
|
|
Loading…
Reference in New Issue