mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-05-09 01:56:52 +00:00
* Add Makefile and yamllint config Signed-off-by: Ian Lewis <ianmlewis@gmail.com> * Add golangci-lint config Signed-off-by: Ian Lewis <ianmlewis@gmail.com> * Add golangci-lint config Signed-off-by: Ian Lewis <ianmlewis@gmail.com> * add linters to pre-submit Signed-off-by: Ian Lewis <ianmlewis@gmail.com> * add issue link to todos Signed-off-by: Ian Lewis <ianmlewis@gmail.com> * Fix whitespace issue Signed-off-by: Ian Lewis <ianmlewis@gmail.com> Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Pre submits cli
|
|
on:
|
|
pull_request:
|
|
branches: ["main"]
|
|
workflow_dispatch:
|
|
# Used in combination with schedule.cli.yml
|
|
# to avoid duplicating the test code.
|
|
schedule:
|
|
- cron: "25 6 * * 5"
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
pre-submit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3.1.2
|
|
|
|
- name: setup-go
|
|
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3.3.1
|
|
with:
|
|
go-version: "1.18"
|
|
|
|
- name: Save event name
|
|
env:
|
|
EVENT_NAME: ${{ github.event_name }}
|
|
run: |
|
|
echo "$EVENT_NAME" > ./event_name.txt
|
|
|
|
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3.1.1
|
|
with:
|
|
name: event_name
|
|
path: ./event_name.txt
|
|
|
|
- name: Run tests for verifier
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
go mod vendor
|
|
|
|
# Build cli
|
|
go build -mod=vendor -o slsa-verifier ./cli/slsa-verifier/
|
|
|
|
# Builder service
|
|
go build -mod=vendor -o service ./cli/experimental/service/
|
|
|
|
# Tests
|
|
go test -mod=vendor -v -timeout=20m ./...
|