From 2c9b7cfbaab40ed9152d3dedfce4c4b9be5765af Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Thu, 9 Apr 2020 08:50:30 +0200 Subject: [PATCH] Continuous integration with GitHub workflow (#1091) * Adds github workflow * Add CIFuzz github workflow * remove Gopkg.toml stuff --- .github/workflows/cifuzz.yml | 23 +++++++++++++++++++++++ .github/workflows/go.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/cifuzz.yml create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml new file mode 100644 index 00000000..3e1487c4 --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,23 @@ +name: CIFuzz +on: [pull_request] +jobs: + Fuzzing: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'go-dns' + dry-run: false + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'go-dns' + fuzz-seconds: 600 + dry-run: false + - name: Upload Crash + uses: actions/upload-artifact@v1 + if: failure() + with: + name: artifacts + path: ./out/artifacts diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..d370103d --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,32 @@ +name: Go +on: [push, pull_request] +jobs: + + build: + name: Build and Test + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Get dependencies + run: go get -v -t -d ./... + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Fuzz + run: | + export GOPATH=$GOROOT + make -f Makefile.fuzz get + make -f Makefile.fuzz