api/component_convertor: fixes nil panic (#15) #53
This file contains 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
--- | |
name: Linting and Test | |
# Run for all pushes to main and pull requests when Go or YAML files change | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
golangci: | |
name: lint-and-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.62.0 | |
args: --timeout=5m | |
skip-cache: true | |
- name: Install psql client library | |
run: | | |
sudo apt install -y postgresql-common && \ | |
sudo YES=yes /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -i -v 17 && \ | |
sudo apt install -y postgresql-client-17 | |
- name: Setup test DB | |
run: make test-database | |
- name: Run go tests and generate coverage report | |
run: | | |
docker ps -a | |
make test | |
- name: Stop test database | |
if: always() | |
run: make test-database-down | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.txt | |
flags: unittests | |
name: codecov-umbrella |