Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflows #3

Merged
merged 1 commit into from
Mar 22, 2024
Merged
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
60 changes: 0 additions & 60 deletions .github/actions/copy-from-oci/action.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/actions/post-container-location/action.yml

This file was deleted.

11 changes: 7 additions & 4 deletions .github/workflows/kuksa_databroker-cli_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Build kuksa-databroker-cli

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
paths:
- ".github/workflows/kuksa_databroker-cli_build.yml"
Expand All @@ -30,6 +30,10 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

# Needed as default_workflow_permissions is "read"
permissions:
packages: write

jobs:
lint:
name: Lint
Expand All @@ -52,7 +56,7 @@ jobs:
- name: cargo clippy
working-directory: ${{github.workspace}}
run: cargo clippy --all-targets -- -W warnings -D warnings

check_ghcr_push:
name: Check access rights
uses: eclipse-kuksa/kuksa-actions/.github/workflows/check_ghcr_push.yml@2
Expand Down Expand Up @@ -152,9 +156,8 @@ jobs:
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false


- name: Posting message
uses: ./.github/actions/post-container-location
uses: eclipse-kuksa/kuksa-actions/post-container-location@2
with:
image: ttl.sh/eclipse-kuksa/kuksa-databroker-cli-${{github.sha}}

Expand Down
29 changes: 8 additions & 21 deletions .github/workflows/kuksa_databroker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Build kuksa-databroker

on:
push:
branches: [ master ]
branches: [ main]
pull_request:
workflow_call:
workflow_dispatch:
Expand All @@ -24,6 +24,10 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

# Needed as default_workflow_permissions is "read"
permissions:
packages: write

jobs:
lint:
name: Lint
Expand Down Expand Up @@ -77,6 +81,8 @@ jobs:
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
# To use v4 a token must be specifed by "token: ${{ secrets.CODECOV_TOKEN }}""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get a warning "Node.js 16 actions are deprecated. " if using v3 (but it works).
If using v4 (to resolve warning) it seems we need to create a token and upload.
Could possibly be done similar to how we do for other secrets at https://github.com/eclipse-kuksa/.eclipsefdn/blob/main/otterdog/eclipse-kuksa.jsonnet#L29

# Uploaded result available at https://app.codecov.io/gh/eclipse-kuksa/kuksa-databroker
uses: codecov/codecov-action@v3
with:
files: lcov.info
Expand Down Expand Up @@ -230,29 +236,10 @@ jobs:
provenance: false

- name: Posting message
uses: ./.github/actions/post-container-location
uses: eclipse-kuksa/kuksa-actions/post-container-location@2
with:
image: ttl.sh/eclipse-kuksa/kuksa-databroker-${{github.sha}}

# - name: "Archiving AMD64 artifacts"
# uses: actions/upload-artifact@v4
# with:
# name: databroker-amd64
# path: ${{github.workspace}}/dist/amd64

# - name: "Archiving ARM64 artifacts"
# uses: actions/upload-artifact@v4
# with:
# name: databroker-arm64
# path: ${{github.workspace}}/dist/arm64

# - name: "Archiving RISCV64 artifacts"
# uses: actions/upload-artifact@v4
# with:
# name: databroker-riscv64
# path: ${{github.workspace}}/dist/riscv64


integration-test:
name: Run integration test
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
with:
# required to grab the history of the PR
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: pre-commit/[email protected]
with:
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See https://pre-commit.com for more information
Copy link
Contributor Author

@erikbosch erikbosch Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can discuss how useful it is to have pre-commit as we mainly have Rust files, but if we have it we need this file. It will at least check for trailing whitespaces in *.md, *.yaml and similar files. Cargo tools maybe anyway do similar tasks for Rust files?
If not we should remove the corresponding workflow.

# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude_types: ["dbc"]
- id: end-of-file-fixer
exclude_types: ["dbc", "json"]
exclude: \.token$
- id: check-yaml
- id: check-added-large-files
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing to Eclipse Kuksa

Thanks for your interest in this project.

## Eclipse Contributor Agreement

Before your code contribution can be accepted by the project team contributors must
electronically sign the Eclipse Contributor Agreement (ECA).

* http://www.eclipse.org/legal/ECA.php

Commits that are provided by non-committers must have a Signed-off-by field in
the footer indicating that the author is aware of the terms by which the
contribution has been provided to the project. The non-committer must
additionally have an Eclipse Foundation account and must have a signed Eclipse
Contributor Agreement (ECA) on file.

For more information, please see the Eclipse Committer Handbook:
https://www.eclipse.org/projects/handbook/#resources-commit

## Contact

Contact the project developers via the project's "dev" list.

* https://dev.eclipse.org/mailman/listinfo/kuksa-dev

## Pre-commit set up
This repository is set up to use [pre-commit](https://pre-commit.com/) hooks.
Use `pip install pre-commit` to install pre-commit.
After you clone the project, run `pre-commit install` to install pre-commit into your git hooks.
Pre-commit will now run on every commit.
Every time you clone a project using pre-commit running pre-commit install should always be the first thing you do.
Loading
Loading