mirror of
https://github.com/axllent/mailpit.git
synced 2025-01-06 00:25:39 +02:00
5807747fa5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Tests
|
|
on:
|
|
pull_request:
|
|
branches: [ develop, 'feature/**' ]
|
|
push:
|
|
branches: [ develop, 'feature/**' ]
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.21.x]
|
|
os: [ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- uses: actions/checkout@v4
|
|
- name: Run Go tests
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
- run: go test ./internal/storage ./server ./internal/tools ./internal/html2text -v
|
|
- run: go test ./internal/storage ./internal/html2text -bench=.
|
|
|
|
# build the assets
|
|
- name: Build web UI
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
cache: 'npm'
|
|
- run: npm install
|
|
- run: npm run package
|
|
|
|
# validate the swagger file
|
|
- name: Validate OpenAPI definition
|
|
uses: char0n/swagger-editor-validate@v1
|
|
with:
|
|
definition-file: server/ui/api/v1/swagger.json
|