diff --git a/.github/workflows/libraries_compile-examples.yml b/.github/workflows/libraries_compile-examples.yml index fcdaae5d..5301364e 100644 --- a/.github/workflows/libraries_compile-examples.yml +++ b/.github/workflows/libraries_compile-examples.yml @@ -15,6 +15,10 @@ jobs: test: runs-on: ubuntu-latest + env: + PYTHON_PROJECT_PATH: ${GITHUB_WORKSPACE}/compilesketches + PYTHON_PROJECT_TESTS_PATH: ${GITHUB_WORKSPACE}/compilesketches/tests + steps: - name: Checkout uses: actions/checkout@v2 @@ -27,18 +31,18 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --requirement "$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches/tests/requirements.txt" + pip install --requirement "${{ env.PYTHON_PROJECT_TESTS_PATH }}/requirements.txt" - name: Lint with flake8 run: | pip install --quiet flake8 pip install --quiet pep8-naming - flake8 --config "$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches/.flake8" --show-source "$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches" + flake8 --config "${{ env.PYTHON_PROJECT_PATH }}/.flake8" --show-source "${{ env.PYTHON_PROJECT_PATH }}" - name: Run Python unit tests and report code coverage run: | - export PYTHONPATH="$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches" - coverage run --source="$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches" --module pytest "$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches/tests" + export PYTHONPATH="${{ env.PYTHON_PROJECT_PATH }}" + coverage run --source="${{ env.PYTHON_PROJECT_PATH }}" --module pytest "${{ env.PYTHON_PROJECT_TESTS_PATH }}" # Display code coverage report in workflow run log coverage report diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index e3f91d74..2f9fba74 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -11,7 +11,6 @@ jobs: uses: actions/checkout@v2 - name: Spell check - uses: ./libraries/spell-check + uses: arduino/actions/libraries/spell-check@master with: ignore-words-list: etc/codespell-ignore-words-list.txt - skip-paths: ./libraries/spell-check/test/testdata,./setup-taskfile/node_modules,./setup-taskfile/package-lock.json