Skip to content

Import repo

Import repo #1

name: CI
on:
pull_request:
branches: ["main"]
paths:
[
"reference-converter/**",
".github/workflows/reference-converter.yml",
".golangci.yml",
]
defaults:
run:
working-directory: ./reference-converter
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: ./reference-converter
testResults: ./reference-converter/results/test.xml
steps:
# TODO: re-use common/action.yml, need to refactor out some docs-specific steps
- uses: actions/checkout@v3
# TODO: publish the devtools image to a registry and use it as `jobs.build.container`
- run: make devtools-image
- name: let the build create files
run: chmod 777 .
- run: make build
- run: make test
- name: archive test artifacts
uses: actions/upload-artifact@v3
with:
name: test-report
path: ${{ env.testResults }}
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test Report
path: ${{ env.testResults }}
reporter: jest-junit
lint:
runs-on: ubuntu-latest
env:
working-directory: ./reference-converter
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: ${{ env.working-directory }}/go.mod
cache: false
- name: use the same version of GOLANGCI_LINT_VERSION as devtools
run: make devtools-versions >> "$GITHUB_ENV"
- uses: golangci/golangci-lint-action@v3
with:
working-directory: ${{ env.working-directory }}
version: v${{ env.GOLANGCI_LINT_VERSION }}