From 0608c1f5b8b061e6a243f7a422734fb824e259a9 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Fri, 29 Oct 2021 17:49:20 -0400 Subject: [PATCH] Switch to GitHub Actions, CODEOWNERS, etc. Signed-off-by: Josh Dolitsky --- .github/workflows/build-pr.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ .pullapprove.yml | 27 --------------------------- .travis.yml | 28 ---------------------------- CODEOWNERS | 1 + Makefile | 20 ++++++++++---------- README.md | 2 ++ 7 files changed, 79 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/build-pr.yml create mode 100644 .github/workflows/build.yml delete mode 100644 .pullapprove.yml delete mode 100644 .travis.yml create mode 100644 CODEOWNERS diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 000000000..73666d545 --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,33 @@ +name: build-pr + +on: + pull_request: + branches: + - main + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: checkout source code + uses: actions/checkout@master + - name: setup go environment + uses: actions/setup-go@v1 + with: + go-version: '1.17.2' + - name: run tests + run: | + export PATH="$(go env GOPATH)/bin:${PATH}" + set -x + make install.tools + + # Fix for "cannot find main module" issue + go mod init github.com/opencontainers/runtime-spec + + go get -d ./schema/... + make .govet + make .golint + + make .gitvalidation + make docs + make -C schema test diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..9045dd4e2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: build + +on: + push: + branches: + - main + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: checkout source code + uses: actions/checkout@master + - name: setup go environment + uses: actions/setup-go@v1 + with: + go-version: '1.17.2' + - name: run tests + run: | + export PATH="$(go env GOPATH)/bin:${PATH}" + set -x + make install.tools + + # Fix for "cannot find main module" issue + go mod init github.com/opencontainers/runtime-spec + + go get -d ./schema/... + make .govet + make .golint + + make .gitvalidation + make docs + make -C schema test diff --git a/.pullapprove.yml b/.pullapprove.yml deleted file mode 100644 index ce688e20e..000000000 --- a/.pullapprove.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: 2 - -requirements: - signed_off_by: - required: false - -group_defaults: - required: 2 - approve_by_comment: - enabled: true - approve_regex: ^LGTM - reject_regex: ^Rejected - reset_on_push: - enabled: true - author_approval: - ignored: true - always_pending: - title_regex: ^WIP - explanation: 'Work in progress...' - conditions: - branches: - - master - -groups: - runtime-spec: - teams: - - runtime-spec-maintainers diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ff332f328..000000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: go -go: - - "1.11.x" - - "1.10.x" - - "1.9.x" - -sudo: required - -go_import_path: github.com/opencontainers/runtime-spec - -services: - - docker - -before_install: - - make install.tools - - docker pull vbatts/pandoc - - go get -d ./schema/... - -install: true - -script: - - env | grep TRAVIS_ - - make .govet - - make .golint - - echo "${TRAVIS_COMMIT_RANGE} -> ${TRAVIS_COMMIT_RANGE/.../..} (travis-ci/travis-ci#4596)" - - TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" make .gitvalidation - - make docs - - make -C schema test diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..c47456c22 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @crosbymichael @cyphar @dqminh @giuseppe @hqhq @mrunalp @tianon @vbatts diff --git a/Makefile b/Makefile index c03f781ec..7a61610db 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,19 @@ -EPOCH_TEST_COMMIT := 78e6667ae2d67aad100b28ee9580b41b7a24e667 -OUTPUT_DIRNAME ?= output -DOC_FILENAME ?= oci-runtime-spec -DOCKER ?= $(shell command -v docker 2>/dev/null) -PANDOC ?= $(shell command -v pandoc 2>/dev/null) +EPOCH_TEST_COMMIT := 78e6667ae2d67aad100b28ee9580b41b7a24e667 +OUTPUT_DIRNAME ?= output +DOC_FILENAME ?= oci-runtime-spec +DOCKER ?= $(shell command -v docker 2>/dev/null) +PANDOC ?= $(shell command -v pandoc 2>/dev/null) +PANDOC_IMAGE ?= ghcr.io/opencontainers/pandoc:2.9.2.1-9.fc34.x86_64@sha256:590c5c7aaa6e8e7a4debae7e9102c837daa0c8a76f8f5b5c9831ea5f755e3e95 ifeq "$(strip $(PANDOC))" '' ifneq "$(strip $(DOCKER))" '' PANDOC = $(DOCKER) run \ --security-opt label=disable \ - -it \ --rm \ -v $(shell pwd)/:/input/:ro \ -v $(shell pwd)/$(OUTPUT_DIRNAME)/:/$(OUTPUT_DIRNAME)/ \ -u $(shell id -u) \ - vbatts/pandoc + $(PANDOC_IMAGE) PANDOC_SRC := /input/ PANDOC_DST := / endif @@ -69,11 +69,11 @@ ifeq ($(call ALLOWED_GO_VERSION,1.7,$(HOST_GOLANG_VERSION)),true) endif -# When this is running in travis, it will only check the travis commit range +# When this is running in GitHub, it will only check the GitHub commit range .gitvalidation: @which git-validation > /dev/null 2>/dev/null || (echo "ERROR: git-validation not found. Consider 'make install.tools' target" && false) -ifdef TRAVIS_COMMIT_RANGE - git-validation -q -run short-subject,dangling-whitespace +ifdef GITHUB_SHA + git-validation -q -run DCO,short-subject,dangling-whitespace -range $(GITHUB_SHA)..HEAD else git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD endif diff --git a/README.md b/README.md index 3ec6f39b3..af12c6981 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Open Container Initiative Runtime Specification +[![GitHub Actions status](https://github.com/opencontainers/runtime-spec/workflows/build/badge.svg)](https://github.com/opencontainers/runtime-spec/actions?query=workflow%3Abuild) + The [Open Container Initiative][oci] develops specifications for standards on Operating System process and application containers. The specification can be found [here](spec.md).