Skip to content

Commit 9e76e56

Browse files
richvdhclokep
authored andcommitted
Cleanups to github actions workflow (matrix-org#1476)
1 parent f8be5d3 commit 9e76e56

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

β€Ž.github/workflows/main.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,21 @@ jobs:
3737
check-examples:
3838
name: "πŸ”Ž Check Event schema examples"
3939
runs-on: ubuntu-latest
40-
container: uhoreg/matrix-doc-build
4140
steps:
4241
- name: "πŸ“₯ Source checkout"
4342
uses: actions/checkout@v2
43+
- name: "βž• Setup Python"
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: '3.9'
47+
cache: 'pip'
48+
cache-dependency-path: scripts/requirements.txt
49+
- name: "βž• Install dependencies"
50+
run: |
51+
pip install -r scripts/requirements.txt
4452
- name: "πŸ”Ž Run validator"
4553
run: |
46-
/env/bin/python scripts/check-event-schema-examples.py
54+
python scripts/check-event-schema-examples.py
4755
4856
calculate-baseurl:
4957
name: "βš™οΈ Calculate baseURL for later jobs"
@@ -70,15 +78,21 @@ jobs:
7078
build-openapi:
7179
name: "🐍 Build OpenAPI definitions"
7280
runs-on: ubuntu-latest
73-
container: "python:3.9"
7481
needs: [calculate-baseurl]
7582
steps:
7683
- name: "πŸ“₯ Source checkout"
7784
uses: actions/checkout@v2
78-
- name: "πŸ“¦ Asset creation"
85+
- name: "βž• Setup Python"
86+
uses: actions/setup-python@v4
87+
with:
88+
python-version: '3.9'
89+
cache: 'pip'
90+
cache-dependency-path: scripts/requirements.txt
91+
- name: "βž• Install dependencies"
7992
run: |
80-
python3 -m venv env && . env/bin/activate
8193
pip install -r scripts/requirements.txt
94+
- name: "πŸ“¦ Asset creation"
95+
run: |
8296
# The output path matches the final deployment path at spec.matrix.org
8397
scripts/dump-swagger.py \
8498
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Minor cleanups to the GitHub Actions workflows

0 commit comments

Comments
Β (0)