generated from coderefinery/template-forking-workflow-exercise
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fdd2c67
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__pycache__/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'") |