From 048bb406d892d2241070a46a54c6bf359f1e6c85 Mon Sep 17 00:00:00 2001 From: Paul van Santen Date: Wed, 6 Sep 2023 13:05:47 +0200 Subject: [PATCH] Replace CircleCI with Github actions --- .circleci/config.yml | 23 ----------------------- .github/workflows/golangci-lint.yaml | 19 +++++++++++++++++++ .github/workflows/test.yaml | 25 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 23 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/golangci-lint.yaml create mode 100644 .github/workflows/test.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 8b5b5af..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2.1 - -executors: - go: - docker: - - image: circleci/golang:1.13 - -jobs: - test: - executor: go - steps: - - checkout - - run: go get github.com/jstemmer/go-junit-report - - run: mkdir -p /tmp/test-results - - run: go test -v -race ./... | go-junit-report > /tmp/test-results/spec.xml - - store_test_results: - path: /tmp/test-results - -workflows: - version: 2 - main: - jobs: - - test \ No newline at end of file diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml new file mode 100644 index 0000000..e98c5de --- /dev/null +++ b/.github/workflows/golangci-lint.yaml @@ -0,0 +1,19 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - master + - main + - v2 + pull_request: + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..6c48ea1 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,25 @@ +on: [push, pull_request] +name: Test +jobs: + test: + strategy: + matrix: + go-version: [1.18.x, 1.19.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + + steps: + - name: Install Linux packages + if: matrix.os == 'ubuntu-latest' + run: sudo apt update && sudo apt install -y --no-install-recommends ffmpeg + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Test + run: go test -v ./...