Skip to content

Merge pull request #10 from PelionIoT/update-depds #50

Merge pull request #10 from PelionIoT/update-depds

Merge pull request #10 from PelionIoT/update-depds #50

Workflow file for this run

name: PR-checker
on:
push:
# Don't run if only the .md -file is changed
paths-ignore:
- '**/*.md'
workflow_dispatch:
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: pe-terminal-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
go-build-and-checks:
strategy:
matrix:
# Can't use 1.15 because io.Discard is not defined
# Can't use 1.18 vendor/go.uber.org/multierr/error.go:224:20: undefined: atomic.Bool
golang-ver: ["1.19", "1.20", "1.21", "1.22"]
runs-on: ["self-hosted", "client"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up golang
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang-ver }}
- name: Golang version
run: go version
- name: Build all
run: go build ./...
- name: Run make.sh test (go vet + go test)
run: ./make.sh test
- name: Remove vendor folder & run golint
run: |
rm -rf vendor
sudo apt-get update && sudo apt-get install golint
golint ./...
pysh-check:
runs-on: ubuntu-latest
steps:
- name: Set access token for internal repo access
uses: PelionIoT/actions/.github/actions/git-config@main
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
- name: Check out code
uses: actions/checkout@v4
- run: git clone [email protected]:PelionIoT/scripts-internal.git
- name: Run pysh-check
run: |
sudo apt install pycodestyle pydocstyle black
echo "." >scripts-internal/.nopyshcheck
echo "." >vendor/.nopyshcheck
scripts-internal/pysh-check/pysh-check.sh --workdir .
- name: Cleanup .gitconfig
if: always()
run: rm -f ~/.gitconfig