Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/viperproject/gobra-action

Github Action to verify Go code with Gobra directly in a CI workflow
https://github.com/viperproject/gobra-action

actions formal-verification github-actions go golang verification

Last synced: about 2 months ago
JSON representation

Github Action to verify Go code with Gobra directly in a CI workflow

Awesome Lists containing this project

README

        

# Gobra Action

This action adds Gobra to the CI Workflow of Go projects.

## Usage

See [action.yml](./action.yml)

## Examples

### Simple set-up without caching

```yaml
uses: viperproject/gobra-action@main
with:
caching: 0
javaXss: 64m
globalTimeout: 1h
packageTimeout: 10m
projectLocation: go
```

### Set-up with caching

This configuration shows how to set-up the Gobra Action to store the verification results in `${{ runner.workspace }}/.gobra/cache.json`. This file is loaded on subsequent runs of the Gobra Action and all cached verification results will not be re-computed.

```yaml
- name: Cache Viper Server cache
uses: actions/cache@v2
env:
cache-name: vs-cache
with:
path: ${{ runner.workspace }}/.gobra/cache.json
key: ${{ env.cache-name }}
- name: Verify all Gobra files
uses: viperproject/gobra-action@main
with:
caching: 1
viperBackend: VSWITHSILICON
```

### Storing artifacts

There are two artifacts generated by this Action that are worth to be stored:
- the cache file, generated in `${{ runner.workspace }}/.gobra/cache.json`.
- the statistics collected during verification, generated in `${{ runner.workspace }}/.gobra/stats.json`.

The following snippet shows how to store these files as artifacts:

```yaml
- name: Verify all Gobra files
uses: viperproject/gobra-action@main
with:
caching: 1
viperBackend: VSWITHSILICON
- name: Archive cache
uses: actions/upload-artifact@v2
with:
name: cache
path: ${{ runner.workspace }}/.gobra/cache.json
- name: Archive statistics report
uses: actions/upload-artifact@v2
with:
name: stats
path: ${{ runner.workspace }}/.gobra/stats.json

```

# License

The scripts and documentation in this project are released under the [Mozilla Public License 2.0](LICENSE.txt).