Skip test workflow for this branch #122
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| pull_request: | |
| branches-ignore: | |
| - skip-test-workflow | |
| push: | |
| branches: [main] | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Build Docker image | |
| run: docker build --pull --rm -f "appu/Dockerfile" -t appu appu/. | |
| - name: Run tests in Docker container | |
| run: docker run --rm appu /bin/sh -c 'pip install -r dev-requirements.txt; python -m pytest' | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: "^1.16" | |
| - name: Tidy dependencies to local | |
| run: | | |
| go mod tidy | |
| - name: Run tests | |
| run: | | |
| go test -v ./... -race -coverprofile=profile.cov | |
| - name: Upload Coveralls | |
| uses: shogo82148/actions-goveralls@v1 | |
| with: | |
| path-to-profile: profile.cov | |
| check-formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Check formatting | |
| run: | | |
| gofmt -s -e -d -l . | tee /tmp/gofmt.output && [ $(cat /tmp/gofmt.output | wc -l) -eq 0 ] | |
| check-smells: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: "^1.16" | |
| - name: Tidy dependencies to local | |
| run: | | |
| go mod tidy | |
| - name: Check code smells | |
| run: | | |
| go vet ./... | |
| check-complexity: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: "^1.16" | |
| - name: Install gocyclo | |
| run: | | |
| go install github.com/fzipp/gocyclo/cmd/gocyclo@latest | |
| - name: Check cyclomatic complexity | |
| run: | | |
| gocyclo -over 15 . | |
| check-style: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: "^1.16" | |
| - name: Install golint | |
| run: | | |
| go install golang.org/x/lint/golint@latest | |
| - name: Check Style | |
| run: | | |
| golint ./... | |
| check-ineffectual-assignments: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: "^1.16" | |
| - name: Install ineffassign | |
| run: | | |
| go install github.com/gordonklaus/ineffassign@latest | |
| - name: Tidy dependencies to local | |
| run: | | |
| go mod tidy | |
| - name: Check ineffectual assignments | |
| run: | | |
| ineffassign ./... | |
| check-spelling: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: "^1.16" | |
| - name: Install spellchecker | |
| run: | | |
| go install github.com/client9/misspell/cmd/misspell@latest | |
| - name: Check spelling | |
| run: | | |
| misspell -error . | |
| staticcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: "^1.16" | |
| - name: Install and run staticcheck | |
| uses: dominikh/[email protected] | |
| with: | |
| version: "2022.1.1" | |
| check-license: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Check license file is present | |
| run: | | |
| find . -name LICENSE.md |