Skip to content

Commit

Permalink
Only build schemas once
Browse files Browse the repository at this point in the history
  • Loading branch information
MGibson1 committed Sep 19, 2024
1 parent efb4f8b commit 89e3d51
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/language-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,39 @@ jobs:
steps:
- run: exit 0

build-schemas:
name: Build schemas
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Build schemas
run: npm run schemas

- name: zip languages dir
run: zip -r languages.zip languages

- name: Upload schemas
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: languages.zip
path: ${{ github.workspace }}/languages.zip
if-no-files-found: error

test:
name: ${{ matrix.language }}

runs-on: ubuntu-22.04
needs: build-schemas

strategy:
matrix:
Expand Down Expand Up @@ -71,10 +100,15 @@ jobs:
7133ceb2-1cb6-4698-ac8c-b1f000ed43a1 > MUTABLE_ACCESS_TOKEN
57715c03-e0fb-47f1-86b5-b1ed01584a2e > ORGANIZATION_ID
- name: Install schemas
- name: Download schemas artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: languages.zip

- name: Unzip languages with schemas
run: |
npm ci
npm run schemas
rm -rf languages
unzip languages.zip
- name: Set up run data
run: |
Expand Down

0 comments on commit 89e3d51

Please sign in to comment.