Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
willu47 committed May 12, 2021
0 parents commit fdd2c67
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Run the test
run: |
python test.py
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__/
*.pyc
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Forking workflow exercise with taco recipes

Exercise description: https://coderefinery.github.io/git-collaborative/03-distributed/#exercise-practice-collaborative-forking-workflow
15 changes: 15 additions & 0 deletions cauliflower_tacos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# Cauliflower tacos

This recipe is taken as an example from https://github.com/sinker/tacofancy/blob/master/full_tacos/cauliflower_tacos.md.

We are avid meat eaters, but these vegetarian tacos are one of our go-tos in
Peru. If you can make the pickles with Peruvian aji amarillo, please do.

- Roast cauliflower
- Pickled chilis and vegetables
- Caramelized red onions
- Guacamole
- Yogurt
- Tortilla of choice, warmed in a dry pan
18 changes: 18 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
This will loop through all files *.md and check that they contain the string
'taco' (case-insensitive).
"""

from __future__ import print_function
import os
import sys

for filename in os.listdir("."):
if filename.endswith(".md"):
with open(filename, 'r') as f:
recipe = f.read().lower()
if not 'taco' in recipe:
print("file {0} contains no string 'taco'".format(filename), file=sys.stderr)
sys.exit(1)

print("all *.md files contain the string 'taco'")

0 comments on commit fdd2c67

Please sign in to comment.