diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1636a6a..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: 2.1 - -executors: - golangci-lint: - docker: - - image: golangci/golangci-lint:v1.25.0 - go: - docker: - - image: vansante/go-ffprobe:latest - -jobs: - lint: - executor: golangci-lint - steps: - - checkout - - run: golangci-lint run - - 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: - - lint - - 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..19df63c --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,25 @@ +on: [push, pull_request] +name: Test +jobs: + test: + strategy: + matrix: + go-version: [1.15.x, 1.16.x, 1.17.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 ./...