Skip to content

CI: Go: linter

CI: Go: linter #16

Workflow file for this run

---
name: test # this string appears on badge
on:
- push
- pull_request
- workflow_dispatch
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Show go environment
run: go version
- name: Show python environment
run: |
echo '::group::python version'
python --version
echo '::endgroup::'
echo '::group::pip version'
pip --version
echo '::endgroup::'
echo '::group::pip list'
pip list
echo '::endgroup::'
- name: Install python dev deps
run: |
echo '::group::install pylint'
pip install -U pylint
echo '::endgroup::'
echo '::group::install pytest'
pip install -U pytest
echo '::endgroup::'
echo '::group::install pytest-cov'
pip install -U pytest-cov
echo '::endgroup::'
echo '::group::install numpy'
pip install numpy # for examples test only
echo '::endgroup::'
- name: Install python module
working-directory: python
run: pip install .
- name: Lint go
uses: golangci/golangci-lint-action@v3
with:
version: v1.55 # Required. Must be specified without patch version
working-directory: go
- name: Lint python core code
working-directory: python
run: pylint --rcfile pylintrc milisp
- name: Lint python tests
working-directory: python
run: pylint --rcfile pylintrc tests/*
- name: Lint python examples
working-directory: python
run: pylint --rcfile pylintrc-examples examples
- name: Lint python misc
working-directory: python
run: pylint --rcfile pylintrc misc/expr_builder.py
- name: Test go
working-directory: go
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./milisp/...
- name: Test python
working-directory: python
run: pytest -vv --cov=milisp --cache-clear --cov-report=xml tests examples
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: go/coverage.txt,python/coverage.xml # comma-separated
verbose: true