Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add Go tests #440

Merged
merged 15 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run Go Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
npm install
npm run generate.go
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.0'
working-directory: ./clients/go
- name: Run Tests
run: |
cd ./clients/go/test
go test
15 changes: 13 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
clients/go/

clients/python/*
!clients/python/test/test_locales_api.py
!clients/python/test/test_uploads_api.py
Expand Down Expand Up @@ -56,6 +54,19 @@ clients/php/test/Api/*
!clients/php/test/Api/LocalesApiTest.php
!clients/php/test/Api/UploadsApiTest.php

clients/go/*.go
clients/go/README.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've discussed this here #427 (comment) and decided not to go this individual exclusion route. so, feel free to leave this file as is, and only git add -f files that need to be added.

clients/go/git_push.sh
clients/go/go.mod
clients/go/go.sum
clients/go/.gitignore
clients/go/.openapi-generator
clients/go/api/*
clients/go/docs
clients/go/test/*
!clients/go/test/api_locales_test.go
!clients/go/test/api_uploads_test.go

clients/cli/cmd/api_*.go
clients/cli/phrase-cli

Expand Down
157 changes: 157 additions & 0 deletions clients/go/test/api_locales_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions clients/go/test/api_uploads_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading