From 5ed57eb341f7bfe37cda7f10fc4bfbdaef7405dd Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 11 Dec 2021 14:31:47 -0800 Subject: [PATCH] Fix YAML syntax --- .github/actions/run_tests.yml | 82 +++++++++++++------------ .github/workflows/testing_prs.yaml | 3 +- .github/workflows/testing_schedule.yaml | 3 +- 3 files changed, 47 insertions(+), 41 deletions(-) diff --git a/.github/actions/run_tests.yml b/.github/actions/run_tests.yml index 679ba81b..25d6f9cb 100644 --- a/.github/actions/run_tests.yml +++ b/.github/actions/run_tests.yml @@ -1,48 +1,52 @@ -steps: -- run: git config --global core.autocrlf false -- uses: actions/checkout@v2 +name: run jrnl tests +description: Runs all jrnl tests on multiple platforms +runs: + using: "composite" + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 -- name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} -- name: Capture full Python version in env - run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV + - name: Capture full Python version in env + run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV -- name: poetry cache # Change CACHE_STRING secret to bust the cache - uses: actions/cache@v2 - with: - path: .venv - key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }} + - name: poetry cache # Change CACHE_STRING secret to bust the cache + uses: actions/cache@v2 + with: + path: .venv + key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }} -- name: Install dependencies - run: | - echo '::group::poetry' - pip --disable-pip-version-check install poetry - poetry config --local virtualenvs.in-project true - echo '::endgroup::' + - name: Install dependencies + run: | + echo '::group::poetry' + pip --disable-pip-version-check install poetry + poetry config --local virtualenvs.in-project true + echo '::endgroup::' - echo '::group::Other dependencies' - poetry install --remove-untracked - echo '::endgroup::' + echo '::group::Other dependencies' + poetry install --remove-untracked + echo '::endgroup::' - echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV + echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV -- name: Code formatting (Black) - if: ${{ env.DEPS_INSTALLED == 'true' }} - run: | - poetry run black --version - poetry run black --check --diff . + - name: Code formatting (Black) + if: ${{ env.DEPS_INSTALLED == 'true' }} + run: | + poetry run black --version + poetry run black --check --diff . -- name: Code Style (flake8) - if: > - ${{ env.DEPS_INSTALLED == 'true' }} - run: | - poetry run pflake8 --version - poetry run pflake8 jrnl tests + - name: Code Style (flake8) + if: > + ${{ env.DEPS_INSTALLED == 'true' }} + run: | + poetry run pflake8 --version + poetry run pflake8 jrnl tests -- name: Test with pytest - if: > - ${{ env.DEPS_INSTALLED == 'true' }} - run: poetry run pytest --junitxml=reports/pytest/results.xml + - name: Test with pytest + if: > + ${{ env.DEPS_INSTALLED == 'true' }} + run: poetry run pytest --junitxml=reports/pytest/results.xml diff --git a/.github/workflows/testing_prs.yaml b/.github/workflows/testing_prs.yaml index dedde0bc..996fde15 100644 --- a/.github/workflows/testing_prs.yaml +++ b/.github/workflows/testing_prs.yaml @@ -34,4 +34,5 @@ jobs: matrix: python-version: [ 3.7, 3.8, 3.9, '3.10' ] os: [ ubuntu-latest, macos-latest, windows-latest ] - steps: ./.github/actions/run_tests.yml + steps: + - uses: ./.github/actions/run_tests.yml diff --git a/.github/workflows/testing_schedule.yaml b/.github/workflows/testing_schedule.yaml index c5acb87e..6e233900 100644 --- a/.github/workflows/testing_schedule.yaml +++ b/.github/workflows/testing_schedule.yaml @@ -19,4 +19,5 @@ jobs: matrix: python-version: [ 3.7, 3.8, 3.9, '3.10', 3.11-dev ] os: [ ubuntu-latest, macos-latest, windows-latest ] - steps: ./.github/actions/run_tests.yml + steps: + - uses: ./.github/actions/run_tests.yml