From 129c4b6026a194e5d56a3a55ce7e45aa5fb27892 Mon Sep 17 00:00:00 2001 From: IIITM-Jay Date: Sat, 9 Nov 2024 15:12:20 +0530 Subject: [PATCH] Spedd up CI/CD pipleine --- .github/workflows/python-app.yml | 17 +++++++++++------ .github/workflows/tests.yml | 9 +++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 58d125ca..0ba3ac06 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -21,14 +21,19 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install Coverage - run: | - pip3 install coverage + - name: Cache pre-commit environment + uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + ${{ runner.os }}-pre-commit- + + - name: Install dependencies + run: python3 -m pip install pre-commit coverage - name: Run pre-commit - run: | - python3 -m pip install pre-commit - pre-commit run --all-files + run: pre-commit run --all-files - name: Generate run: coverage run ./parse.py -c -chisel -sverilog -rust -latex -spinalhdl -go "rv*" "unratified/rv*" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6615709b..7871786f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,9 +21,18 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Cache pip dependencies + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-coverage + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.python-version }}- + - name: Install dependencies run: | pip3 install coverage + - name: Test error outputs run: coverage run -m unittest -b