Skip to content

Commit

Permalink
rollback cocotb workflow to test coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
jsouter committed Jan 30, 2025
1 parent 80ce3c8 commit b381df1
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/_cocotb_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,37 @@ on:
jobs:
cocotb_test:
runs-on: ubuntu-latest
container:
image: ghcr.io/pandablocks/pandablocks-ci-container:latest
options: --privileged

steps:
# Git repositories
- name: Checkout Source
uses: actions/checkout@v4
uses: actions/checkout@v2
with:
path: repos/PandABlocks-fpga
path: PandABlocks-fpga
# require history to get back to last tag for version number of branches
fetch-depth: 0

- name: Checkout rootfs and Give Directory Perms
uses: ./repos/PandABlocks-fpga/.github/actions/setupenv

# Login into ghcr
- name: login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run cocotb tests
# run tests, create coverage file and make coverage xml paths relative
run: |
cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && \
make cocotb_tests && sed -i 's/\/repos\/PandABlocks-FPGA\///' cocotb_coverage.xml
docker pull ghcr.io/pandablocks/pandablocks-dev-container:4.0a7
docker run \
--net=host \
-v "${{ github.workspace }}:/repos" \
-v "${{ github.workspace }}/build:/build" \
ghcr.io/pandablocks/pandablocks-dev-container:4.0a7 \
/bin/bash -c \
"cd PandABlocks-fpga && ln -s CONFIG.example CONFIG && make cocotb_tests && sed -i 's/\/repos\/pandablocks-fpga\///i' cocotb_coverage.xml"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: nvc-coverage
files: cocotb_coverage.xml
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit b381df1

Please sign in to comment.