From f45a55c300dcd2f77c43408a649184c088ffed9d Mon Sep 17 00:00:00 2001 From: Dan Callahan Date: Fri, 28 May 2021 22:47:14 +0100 Subject: [PATCH] Fix GitHub Actions (#348) * Clean up trailing whitespace * Fix YAML indentation * Correctly reference the checkout sha * Correctly reference the base ref * Add newsfile Signed-off-by: Dan Callahan --- .github/workflows/changelog_check.yml | 4 ++-- .github/workflows/pipeline.yml | 22 ++++++++++------------ changelog.d/348.misc | 1 + 3 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 changelog.d/348.misc diff --git a/.github/workflows/changelog_check.yml b/.github/workflows/changelog_check.yml index 26c17e42..06febd28 100644 --- a/.github/workflows/changelog_check.yml +++ b/.github/workflows/changelog_check.yml @@ -8,9 +8,9 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - ref: ${{ github.head_ref }} + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-python@v2 with: python-version: "3.7" - run: python -m pip install towncrier - - run: python -m towncrier.check --compare-with=${{ github.base_ref }} \ No newline at end of file + - run: python -m towncrier.check --compare-with="origin/${{ github.base_ref }}" diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 4d128ac7..31984aee 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,15 +1,15 @@ name: Linting and tests -on: +on: pull_request: push: branches: ["main"] -jobs: +jobs: check-code-style: runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - with: + with: python-version: '3.6' - run: python -m pip install -e . - run: black --check --diff sydent/ tests/ matrix_is_test/ setup.py @@ -21,8 +21,8 @@ jobs: strategy: matrix: python-version: ['3.6', '3.x'] - - steps: + + steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: @@ -34,10 +34,10 @@ jobs: needs: [check-code-style] runs-on: ubuntu-latest strategy: - matrix: - python-version: ['3.6', '3.x'] - - steps: + matrix: + python-version: ['3.6', '3.x'] + + steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: @@ -45,5 +45,3 @@ jobs: - run: python -m pip install -e . - run: pip install git+https://github.com/matrix-org/matrix-is-tester.git - run: trial matrix_is_tester - - \ No newline at end of file diff --git a/changelog.d/348.misc b/changelog.d/348.misc new file mode 100644 index 00000000..f7df60f9 --- /dev/null +++ b/changelog.d/348.misc @@ -0,0 +1 @@ +Fix GitHub Actions.