Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
name: Run integration tests on a DUT via testflinger
on:
workflow_call:
workflow_dispatch:
pull_request:
# pull_request:
# branches:
# - main
# types:
# - opened
# - reopened
# - synchronize
# - ready_for_review
# - labeled
jobs:
binary-integration-tests:
name: Build and Test the Daemon Binary on DUT
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,34 @@ jobs:
echo "::group::unit test results"
cargo test --bins
echo "::endgroup::"
tics:
if: false # disabled until we get confirmation
permissions:
contents: read
issues: write
pull-requests: write
runs-on: ubuntu-latest
env:
TICS_CHANGED_LIST: tics_changed.list
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get PR files
env:
PR_NUMBER: ${{ github.event.number }}
run: |
gh pr diff "$PR_NUMBER" --name-only >> "$TICS_CHANGED_LIST"
echo "::group::===== Changed Files ====="
cat "$TICS_CHANGED_LIST"
echo "::endgroup::"
- name: Run TICS analysis
uses: tiobe/tics-github-action@v3.4.0
with:
mode: client
project: fpgad
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }}
installTics: true
filelist: ${{ env.TICS_CHANGED_LIST }}
53 changes: 53 additions & 0 deletions .github/workflows/tics_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: TiCS Scan
on:
pull_request:
schedule:
- cron: '17 1 * * 0' # Runs at 01:17 (UTC) on Sunday
jobs:
integration-tests:
secrets: inherit
uses: ./.github/workflows/integration_tests.yml
TICS:
permissions:
contents: read
issues: write
pull-requests: write
needs:
- integration-tests
runs-on: [self-hosted, amd64, tiobe]
env:
GH_TOKEN: ${{ github.token }}
DEBIAN_FRONTEND: noninteractive
COVERAGE_DIR: ${{ github.workspace }}/${{ vars.TICS_COVERAGE_DIR || 'coverage' }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Download coverage report
uses: actions/download-artifact@v4
with:
name: llvm-cov-artifacts
path: artifacts
- uses: actions-rust-lang/setup-rust-toolchain@v1.15
- name: Build
run: |
rustup component add clippy
cargo clippy
cargo build --workspace -v
- name: Move coverage results for TICS
shell: bash
run: |
find ./artifacts
echo "COVERAGE_DIR=${COVERAGE_DIR}"
mkdir -p "$COVERAGE_DIR"
mv -v ./artifacts/*.lcov "$COVERAGE_DIR/"
- name: Run TICS analysis
uses: tiobe/tics-github-action@v3.5.0
with:
mode: qserver
project: fpgad
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default
branchdir: ${{ github.workspace }}
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }}
installTics: true
2 changes: 1 addition & 1 deletion tests/coverage_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

set -xeu
set -x

# Enable llvm-coverage build results
eval "$(cargo llvm-cov show-env --export-prefix)"
Expand Down
Loading