Skip to content

Lint tests

Lint tests #1496

name: Lint tests
on:
workflow_run:
workflows: ["main"]
types:
- completed
jobs:
lint_review:
runs-on: ubuntu-latest
# This needs to be configured more in detail: test-cases are typically
# coming from various external sources or are intentionally not
# adhering to lint rules as they expose a particular problem.
# Also, tests are typically named dut.sv, which typically does not
# match the module inside.
# It is probably more worthwhile to apply lint rules offline than
# commenting on pull requests which mostly results in non-actionable
# suggestions, increasing noise. Until the details are figured out:
# disable this for now.
if: false
steps:
- uses: actions/checkout@v3
- name: 'Download GHA event file'
id: get-artifacts
uses: actions/[email protected]
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "event.json"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/event.json.zip', Buffer.from(download.data));
- run: |
unzip event.json.zip
- name: Run Verible action
uses: chipsalliance/verible-linter-action@main
with:
paths:
./tests/simple_tests
github_token: ${{ secrets.GITHUB_TOKEN }}
suggest_fixes: 'false'