generated from snivilised/astrolib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff4bff2
commit e56a255
Showing
29 changed files
with
167 additions
and
201 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Traverse Continuous Integration | ||
|
||
on: | ||
push: | ||
|
||
|
@@ -25,25 +26,108 @@ jobs: | |
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
# Defining variables is awkward in gh-actions, they can't just be declared | ||
# anywhere; in particular they can't be declared at the top of this file, | ||
# nor can they be declared inside steps. | ||
# | ||
# see: GitHub Actions/Write workflows/Choose what workflows do/ | ||
# Store information in variables | ||
# | ||
env: | ||
COVERAGE_OUTPUT: ${{ github.workspace }}/coverage.out | ||
|
||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install goveralls | ||
run: go install github.com/mattn/goveralls@latest | ||
|
||
- name: Install ginkgo | ||
run: go install github.com/onsi/ginkgo/v2/[email protected] | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- run: go test -v -coverprofile=coverage.out ./... | ||
- name: Print current directory and workspace | ||
run: | | ||
echo "🔹 Current directory: $(pwd) \n" | ||
echo "🔹 GitHub workspace: ${{ github.workspace }} \n" | ||
echo "🔹 COVERAGE_OUTPUT: $COVERAGE_OUTPUT \n" | ||
- uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.out | ||
- name: Ensure coverage directory exists | ||
run: | | ||
mkdir -p ${{ github.workspace }}/coverage | ||
mkdir -p ${{ github.workspace }}/collections/coverage | ||
mkdir -p ${{ github.workspace }}/core/coverage/ | ||
mkdir -p ${{ github.workspace }}/cycle/coverage | ||
mkdir -p ${{ github.workspace }}/enums/coverage | ||
mkdir -p ${{ github.workspace }}/internal/feat/filter/coverage | ||
mkdir -p ${{ github.workspace }}/internal/feat/hiber/coverage | ||
mkdir -p ${{ github.workspace }}/internal/feat/resume/coverage | ||
mkdir -p ${{ github.workspace }}/internal/feat/sampling/coverage | ||
mkdir -p ${{ github.workspace }}/internal/filtering/coverage | ||
mkdir -p ${{ github.workspace }}/internal/kernel/coverage | ||
mkdir -p ${{ github.workspace }}/internal/level/coverage | ||
mkdir -p ${{ github.workspace }}/internal/measure/coverage | ||
mkdir -p ${{ github.workspace }}/internal/services/coverage | ||
mkdir -p ${{ github.workspace }}/internal/level/coverage | ||
mkdir -p ${{ github.workspace }}/internal/third/bus/coverage | ||
mkdir -p ${{ github.workspace }}/internal/third/lo/coverage | ||
mkdir -p ${{ github.workspace }}/internal/types/coverage | ||
mkdir -p ${{ github.workspace }}/locale/coverage | ||
mkdir -p ${{ github.workspace }}/nfs/coverage | ||
mkdir -p ${{ github.workspace }}/pref/coverage | ||
mkdir -p ${{ github.workspace }}/tapable/coverage | ||
# This should be ginko | ||
# This works, but produces bad results (too many incorrect 0% coverage), | ||
# so we need to get ginkgo working. | ||
# | ||
# - name: Run tests and generate coverage profile with Go test | ||
# run: | | ||
# go test ./... -coverprofile=${{ github.workspace }}/coverage/coverage.out | ||
|
||
- name: Send coverage | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: goveralls -coverprofile=coverage.out -service=github | ||
# - name: Run tests and generate coverage profile with Ginkgo | ||
# run: ginkgo ./... --json-report ./ginkgo.report \ | ||
# -coverpkg=$(go list github.com/snivilised/traverse/...) \ | ||
# -coverprofile=${{ github.workspace }}/coverage/coverage.out -r | ||
|
||
# onsi: | ||
- name: Run tests and generate coverage profile with Ginkgo | ||
run: ginkgo ./... --json-report ./ginkgo.report \ | ||
-coverpkg=$(go list github.com/snivilised/traverse/...) \ | ||
-coverprofile=${{ env.COVERAGE_OUTPUT }} -r | ||
|
||
- name: list .out files | ||
run: | ||
echo "🔺 listing out files....\n" | ||
ls -la ${{ env.COVERAGE_OUTPUT }} | ||
|
||
####### | ||
|
||
# - name: Check if coverage file exists | ||
# run: | | ||
# if [ -f "${{ env.COVERAGE_OUTPUT }}" ]; then | ||
# echo "Coverage file generated successfully" | ||
# else | ||
# echo "Coverage file not found" | ||
# exit 1 | ||
# fi | ||
|
||
- name: Generate HTML coverage report | ||
run: | | ||
if [ -f ${{ env.COVERAGE_OUTPUT }} ]; then | ||
go tool cover -html=${{ env.COVERAGE_OUTPUT }} -o ${{ github.workspace }}/coverage/coverage.html | ||
else | ||
echo "coverage.out file not found" | ||
exit 1 | ||
fi | ||
- name: Upload coverage to Coveralls | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: ${{ env.COVERAGE_OUTPUT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
coverage | ||
coverage.out | ||
ginkgo.report | ||
report.json | ||
|
||
.task/ | ||
|
||
|
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.