Skip to content

simplified if

simplified if #17

Workflow file for this run

# This is simple workflow to test kedro new command
name: "Test `kedro new`"
on: [push]
jobs:
test_kedro_new:
name: "Test kedro new"
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["mini-poetry"]
starter: [".", "https://github.com/rnoxy/kedro-starters"]
include:
- python-version: "3.9"
- kedro-version: "0.18.14"
- starter: "https://github.com/rnoxy/kedro-starters"
branch_name: ${GITHUB_REF#refs/heads/}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install kedro
run: |
python -m pip install --upgrade pip
pip install kedro==${{ matrix.kedro-version }}
- name: Show kedro info
run: kedro info
- name: Run kedro new (local)
if: matrix.starter == "."

Check failure on line 39 in .github/workflows/test-kedro-new.yml

View workflow run for this annotation

GitHub Actions / Test `kedro new`

Invalid workflow file

The workflow is not valid. .github/workflows/test-kedro-new.yml (Line: 39, Col: 13): Unexpected symbol: '"'. Located at position 19 within expression: matrix.starter == "." .github/workflows/test-kedro-new.yml (Line: 46, Col: 13): Unexpected symbol: '"'. Located at position 19 within expression: matrix.starter != "."
run: |
kedro new \
--starter ${{ matrix.starter }} \
--directory ${{ matrix.directory }} \
--config tests/${{ matrix.directory }}/config.yml \
- name: Run kedro new (remote)
if: matrix.starter != "."
run: |
kedro new \
--starter ${{ matrix.starter }} \
--directory ${{ matrix.directory }} \
--checkout ${{ matrix.branch_name }} \
--config tests/${{ matrix.directory }}/config.yml \
fi
- name: Check that the project directory exists
run: |
if [ ! -d test-project ]; then
echo "test-project directory does not exist"
exit 1
fi
- name: Check that major project files exist
run: |
for file in \
README.md \
src/test_project/settings.py \
src/test_project/pipeline_registry.py \
src/test_project/__init__.py \
src/test_project/__main__.py;
do
if [ ! -f test-project/$file ]; then
echo "$file does not exist"
exit 1
fi
done