Skip to content

Commit

Permalink
init codacy code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Sep 21, 2023
1 parent dd68da5 commit 6aae960
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
[![Platforms](https://img.shields.io/badge/Platforms-Linux-blue.svg)](https://vintner.opentosca.org)
[![npm](https://img.shields.io/badge/npm-can2x-blue)](https://www.npmjs.com/package/can2x)

> TODO: code code coverage badge
> TODO: release pipeline badge
`can2x` is a simple utility for connecting a CAN bus bidirectional with another CAN bus over the network using common web protocols, such as HTTP, MQTT, Socket.IO, and WebSockets.

## Overview
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- main
- fix-release-workflow

jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
###################################################
#
# Prepare
#
###################################################

- name: (PREPARE) Checkout Repository
uses: actions/checkout@v3
with:
lfs: true

- name: (PREPARE) Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: (PREPARE) Install Node Modules
run: yarn --frozen-lockfile

- name: (PREPARE) Setup SocketCAN
run: |
sudo apt-get install -y can-utils libnode-dev linux-modules-extra-$(uname -r)
sudo modprobe can
sudo modprobe can_raw
sudo modprobe vcan
###################################################
#
# Test
#
###################################################
- name: (TEST) Check Dependencies
run: yarn dependencies:check

- name: (TEST) Check ESLint
run: yarn lint:check

- name: (TEST) Check Prettier
run: yarn style:check

- name: (TEST) Run Tests
run: sudo yarn test

- name: (TEST) Upload Tests to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info
4 changes: 0 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Tests
on:
workflow_dispatch:
push:
branches:
- main
- fix-workflow-tests
pull_request:
branches:
- main
Expand Down

0 comments on commit 6aae960

Please sign in to comment.