Skip to content

[c] Update permission for publishing #7

[c] Update permission for publishing

[c] Update permission for publishing #7

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-django-headless-cms-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-lint
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
- name: Lint
run: bash scripts/lint.sh
# test:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11"]
# fail-fast: false
# steps:
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - uses: actions/cache@v3
# id: cache
# with:
# path: ${{ env.pythonLocation }}
# key: ${{ runner.os }}-python-${{ env.pythonLocation }}-django-headless-cms-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test
# - name: Install Dependencies
# if: steps.cache.outputs.cache-hit != 'true'
# run: pip install -r requirements-tests.txt
# - run: mkdir coverage
# - name: Test
# run: coverage run -m pytest tests
# env:
# COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
# CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
# - name: Store coverage files
# uses: actions/upload-artifact@v3
# with:
# name: coverage
# path: coverage