Skip to content

Commit

Permalink
Github actions (#36)
Browse files Browse the repository at this point in the history
Add github actions which performs
- format checking
- import checking
- unit tests
---------

Co-authored-by: wsodsong <wasuwee.sodsong@gmail.com>
  • Loading branch information
cabrador and wsodsong authored Apr 9, 2024
1 parent da3f446 commit 6d51459
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Refactoring (changes that do NOT affect functionality)
- [ ] Adds or updates testing
- [ ] This change requires a documentation update
22 changes: 22 additions & 0 deletions .github/workflows/CI_UBUNTU.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
pull_request:
branches: [ "main", "develop" ]

jobs:

build:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check import formatting
run: diff -u <(echo -n) <(find . \( -path "./carmen" -o -path "./tosca" \) -prune -o -name '*.go' -exec goimports -l {} \;)

- name: Check code formatting
run: diff -u <(echo -n) <(find . \( -path "./carmen" -o -path "./tosca" \) -prune -o -name '*.go' -exec gofmt -d -s {} \;)

- name: Test
run: go test -v ./...
21 changes: 21 additions & 0 deletions .github/workflows/Documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Documentation

on:
pull_request:
branches:
- main
types:
- closed

jobs:
docs_update:
if: ${{ github.event.pull_request.merged }}
runs-on: self-hosted
steps:
- name: Upload Documentation to Wiki
uses: SwiftDocOrg/github-wiki-publish-action@v1
with:
path: "docs"
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

0 comments on commit 6d51459

Please sign in to comment.