Skip to content

Commit

Permalink
Fix eng content tests; run tests via GitHub Actions (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Jun 27, 2024
1 parent de48a52 commit 6df635f
Show file tree
Hide file tree
Showing 50 changed files with 95 additions and 82 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Continuous Integration
on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Run tests
run: go test -v ./...
2 changes: 2 additions & 0 deletions _content/tour/eng/algorithms/fun/freq_concurrent.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build OMIT

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0

Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/arrays/example2.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/channels/example10.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/composition/assertions/example1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/composition/decoupling/exercise1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/composition/grouping/example1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/composition/mocking/example1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/constants/example4.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/context/answer1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/context/example5.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/context/exercise1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/data_race/example5.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/data_race/example6.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/error-handling/example4.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/error-handling/example5.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/error-handling/exercise1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/error-handling/exercise2.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/exporting/answer1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/exporting/example1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/exporting/example2.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/exporting/example3.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/exporting/example4.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/exporting/example5.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/exporting/exercise1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/generics/type-constraints/exercise1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/interfaces/example2.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/interfaces/example3.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/interfaces/example4.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/interfaces/example6.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/maps/example3.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/maps/example6.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/maps/example8.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/methods/example5.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/methods/exercise1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || nobuild

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/slices/example1.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/slices/example8.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build OMIT
//go:build OMIT || norun

// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
Expand Down
16 changes: 4 additions & 12 deletions _content/tour/eng/static/partials/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
<div settitle="'Home'" class="container">
<div class="page-header">
<h1>Ultimate Go Tour</h1>
<p>Patch 36</p>
<p>Patch 37</p>
</div>
<div style="text-align: center">
<img
style="width: 100%; max-width: 3000px"
src="/tour/eng/static/img/ardan-labs-go-tour-banner.png"
alt="Take the Ultimate Go Tour!" />
<img style="width: 100%; max-width: 3000px" src="/tour/eng/static/img/ardan-labs-go-tour-banner.png" alt="Take the Ultimate Go Tour!" />
</div>
<div class="module" ng-repeat="m in toc.modules">
<p id="{{m.id}}" class="module-title">{{m.title}}</p>
Expand All @@ -22,15 +19,10 @@ <h2>Ardan Labs</h2>
<p>Copyright 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Ardan Labs</p>
<ul>
<li>
<a href="https://www.ardanlabs.com/training/" target="_blank"
>Review our different courses and material</a
>
<a href="https://www.ardanlabs.com/training/" target="_blank">Review our different courses and material</a>
</li>
</ul>
<p>
Reach out about corporate training events, open enrollment live training sessions, and on-demand learning
options.
</p>
<p>Reach out about corporate training events, open enrollment live training sessions, and on-demand learning options.</p>
<p>
Ardan Labs (<a href="https://www.ardanlabs.com" target="_blank">www.ardanlabs.com</a>) -
<a href="mailto:[email protected]" target="_blank">[email protected]</a>
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/eng/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/eng/script.js?p=36"></script>
<script src="/tour/eng/script.js?p=37"></script>
</body>

</html>
2 changes: 2 additions & 0 deletions _content/tour/eng/welcome/sandbox.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build OMIT

package main

import (
Expand Down
2 changes: 1 addition & 1 deletion _content/tour/fre/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/fre/script.js?p=36"></script>
<script src="/tour/fre/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/ger/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/ger/script.js?p=36"></script>
<script src="/tour/ger/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/grc/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/grc/script.js?p=36"></script>
<script src="/tour/grc/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/ita/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/ita/script.js?p=36"></script>
<script src="/tour/ita/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/per/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/per/script.js?p=36"></script>
<script src="/tour/per/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/pol/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/pol/script.js?p=36"></script>
<script src="/tour/pol/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/por/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/por/script.js?p=36"></script>
<script src="/tour/por/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/rus/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/rus/script.js?p=36"></script>
<script src="/tour/rus/script.js?p=37"></script>
</body>

</html>
2 changes: 1 addition & 1 deletion _content/tour/tur/template/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<div ng-view ng-cloak class="ng-cloak"></div>

<script src="/tour/tur/script.js?p=36"></script>
<script src="/tour/tur/script.js?p=37"></script>
</body>

</html>
Loading

0 comments on commit 6df635f

Please sign in to comment.