Added {% raw %} and {% endraw %} to allow jinja to parse the tempaltes correctly.

This commit is contained in:
Arnav Choudhury 2020-09-19 02:31:07 +05:30
parent ed701a042b
commit c061fba40e
3 changed files with 7 additions and 7 deletions

View File

@ -177,4 +177,4 @@ debug:
.. _GitLab CI: https://docs.gitlab.com/ee/ci/
.. _Github CI: https://docs.github.com/en/actions
.. _Github Actions: https://docs.github.com/en/actions

View File

@ -245,7 +245,7 @@ def test_github_invokes_flake8_and_pytest(
assert result.project.basename == context["project_slug"]
assert result.project.isdir()
with open(f"{result.project}/.github/workflows/.github-ci.yml", "r") as github_yml:
with open(f"{result.project}/.github/workflows/ci.yml", "r") as github_yml:
try:
github_config = yaml.safe_load(github_yml)
assert github_config["flake8"]["script"] == ["flake8"]

View File

@ -1,12 +1,10 @@
name: Github-CI
name: CI
# Enable Buildkit and let compose use it to speed up image building
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
on:
pull_request:
branches: [ "master" ]
@ -17,7 +15,6 @@ on:
paths-ignore: [ "docs/**" ]
jobs:
lint:
runs-on: ubuntu-latest
@ -47,6 +44,7 @@ jobs:
- name: Checkout Code Repository
uses: actions/checkout@v2
{% if cookiecutter.use_docker == 'y' -%}
- name: Build the Stack
run: docker-compose -f local.yml build
@ -61,6 +59,7 @@ jobs:
- name: Tear down the Stack
run: docker-compose down
{%- else %}
- name: Set up Python 3.8
@ -73,6 +72,7 @@ jobs:
run: |
echo "::set-output name=dir::$(pip cache dir)"
{% raw %}
- name: Cache pip Project Dependencies
uses: actions/cache@v2
with:
@ -82,6 +82,7 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/local.txt') }}
restore-keys: |
${{ runner.os }}-pip-
{% endraw %}
- name: Install Dependencies
run: |
@ -91,5 +92,4 @@ jobs:
- name: Test with pytest
run: pytest
{%- endif %}