From ac8d34bc816301b8843354d449b8b98c79d62b10 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 29 Mar 2023 11:16:52 +0100 Subject: [PATCH] Cleanups to github actions workflow (#1476) --- .github/workflows/main.yml | 24 +++++++++++++++---- .../internal/newsfragments/1476.clarification | 1 + 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 changelogs/internal/newsfragments/1476.clarification diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 108bd23f..2227a119 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,13 +37,21 @@ jobs: check-examples: name: "🔎 Check Event schema examples" runs-on: ubuntu-latest - container: uhoreg/matrix-doc-build steps: - name: "📥 Source checkout" uses: actions/checkout@v2 + - name: "➕ Setup Python" + uses: actions/setup-python@v4 + with: + python-version: '3.9' + cache: 'pip' + cache-dependency-path: scripts/requirements.txt + - name: "➕ Install dependencies" + run: | + pip install -r scripts/requirements.txt - name: "🔎 Run validator" run: | - /env/bin/python scripts/check-event-schema-examples.py + python scripts/check-event-schema-examples.py calculate-baseurl: name: "⚙️ Calculate baseURL for later jobs" @@ -70,15 +78,21 @@ jobs: build-openapi: name: "🐍 Build OpenAPI definitions" runs-on: ubuntu-latest - container: "python:3.9" needs: [calculate-baseurl] steps: - name: "📥 Source checkout" uses: actions/checkout@v2 - - name: "📦 Asset creation" + - name: "➕ Setup Python" + uses: actions/setup-python@v4 + with: + python-version: '3.9' + cache: 'pip' + cache-dependency-path: scripts/requirements.txt + - name: "➕ Install dependencies" run: | - python3 -m venv env && . env/bin/activate pip install -r scripts/requirements.txt + - name: "📦 Asset creation" + run: | # The output path matches the final deployment path at spec.matrix.org scripts/dump-swagger.py \ --base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \ diff --git a/changelogs/internal/newsfragments/1476.clarification b/changelogs/internal/newsfragments/1476.clarification new file mode 100644 index 00000000..340826b1 --- /dev/null +++ b/changelogs/internal/newsfragments/1476.clarification @@ -0,0 +1 @@ +Minor cleanups to the GitHub Actions workflows