Skip to content

Workflow fixes

Workflow fixes #2

Workflow file for this run

name: Tests
on:
workflow_run:
workflows: [Codegen]
types: [completed]
jobs:
tests:
runs-on: ${{ matrix.platform }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
fail-fast: true
matrix:
# python: ["3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.11"]
# platform: ["windows-latest", "ubuntu-latest", "macos-latest"]
platform: ["ubuntu-latest"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: |
codegen
tests
- name: Download Codegen Output
uses: actions/github-script@v6
with:

Check failure on line 30 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "codegen_results"
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/codegen_results.zip`, Buffer.from(download.data));
- name: Unzip
run: unzip codegen_results.zip src/gdmath
- name: Test Download
run: dir src\gdmath
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Build
run: pip install .
- name: Test
run: pytest tests