From 579bb03164de50b1b4deff10febfa7e82463b82a Mon Sep 17 00:00:00 2001 From: Tricia Decker <1440268+pdecks@users.noreply.github.com> Date: Tue, 28 Sep 2021 10:44:22 -0700 Subject: [PATCH] Migrating Travis CI to GH Actions (#101) --- .github/workflows/actions.yml | 6 ------ .github/workflows/test.yml | 38 +++++++++++++++++++++++++++++++++++ .travis.yml | 19 ------------------ 3 files changed, 38 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/actions.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml deleted file mode 100644 index 9db6fb0..0000000 --- a/.github/workflows/actions.yml +++ /dev/null @@ -1,6 +0,0 @@ -on: [push, pull_request] -jobs: - update-ci: - runs-on: ubuntu-latest - steps: - - run: echo "CI is no longer running on this repo, update the files in .github/workflows to re-enable it. See the .travis.yml file for your previous CI config"; exit 1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b16df07 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + protoc-version: ['3.5.0', '3.6.0', '3.17.0'] + env: + GOPATH: ${{ github.workspace }} + GOBIN: ${{ github.workspace }}/bin + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/github.com/lyft/protoc-gen-star + name: protoc version ${{ matrix.protoc-version }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + path: ${{ env.GOPATH }}/src/github.com/lyft/protoc-gen-star + - name: Set Up Go + uses: actions/setup-go@v2 + with: + go-version: '1.14.6' + - run: mkdir -p $GOPATH/bin + - run: wget "https://github.com/protocolbuffers/protobuf/releases/download/v${{ matrix.protoc-version }}/protoc-${{ matrix.protoc-version }}-linux-x86_64.zip" -O /tmp/protoc.zip + - run: unzip /tmp/protoc.zip -d /tmp + - run: sudo mv /tmp/bin/protoc /usr/local/bin/protoc + - run: sudo mv /tmp/include/google /usr/local/include/google + - name: Generate Testdata + run: make testdata + - name: Lint + run: make lint tests diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f05c01d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: go -go: "1.14.6" -go_import_path: github.com/lyft/protoc-gen-star - -env: - matrix: - - PROTOC_VER="3.5.0" - - PROTOC_VER="3.6.0" - - PROTOC_VER="3.17.0" - -before_install: - - mkdir -p $GOPATH/bin - - wget "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip" -O /tmp/protoc.zip - - unzip /tmp/protoc.zip -d /tmp - - sudo mv /tmp/bin/protoc /usr/local/bin/protoc - - sudo mv /tmp/include/google /usr/local/include/google - -install: make testdata -script: make lint tests