Use mage imports #149
Workflow file for this run
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: PR test CI | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: elisa-normal | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: elisa-actions/setup-go-and-mage@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Run unit tests | |
run: mage go:unitTest | |
- name: Upload test coverage to codecov | |
uses: elisa-actions/codecov-action@v4-elisa | |
with: | |
url: https://codecov.csf.elisa.fi | |
- name: Lint | |
run: mage go:lint | |
- name: Vuln check | |
run: mage go:vulnCheck | |
- name: License check | |
run: mage go:licenses | |
- name: Build binary | |
run: mage go:build | |
- name: Build image | |
env: | |
DOCKER_IMAGE_TAGS: sha-${{ github.event.pull_request.head.sha }} | |
run: mage docker:build | |
automerge: | |
needs: [build] | |
permissions: | |
pull-requests: write | |
contents: write | |
runs-on: elisa-normal | |
timeout-minutes: 15 | |
steps: | |
- name: Automerge dependabot PR | |
uses: elisa-actions/github-action-merge-dependabot@v3 | |
with: | |
target: minor |