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

use nsc for coverage #2893

Merged
merged 22 commits into from
Jul 18, 2024
15 changes: 11 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

test:
name: Go Coverage
runs-on: ${{ matrix.platform }}
runs-on: ${{ matrix.package == 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner' }}
if: ${{ needs.changes.outputs.package_count_deps > 0 && (github.event_name != 'push' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }}
needs: changes
strategy:
Expand Down Expand Up @@ -112,6 +112,7 @@ jobs:

- name: Go modules cache
uses: actions/cache@v4
if: ${{ !contains(runner.name, 'nsc') }}
with:
# see https://github.com/mvdan/github-actions-golang
# also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night)
Expand All @@ -128,6 +129,14 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: ${{ contains(runner.name, 'nsc') && 'false' || 'true' }}

# TODO: consider setting up cache key, see: https://discord.com/channels/975088590705012777/1263347501721714793/1263534719954452560
- name: Setup Go cache
uses: namespacelabs/nscloud-cache-action@v1
if: ${{ contains(runner.name, 'nsc') }}
with:
cache: go

- name: Verify MariaDB connection
env:
Expand Down Expand Up @@ -201,7 +210,7 @@ jobs:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
GOMEMLIMIT: 3GiB
GOMEMLIMIT: 8GiB
GOGC: -1
ETHEREUM_RPC_URI: ${{ secrets.ETHEREUM_RPC_URI }}
GOPROXY: https://proxy.golang.org
Expand Down Expand Up @@ -254,8 +263,6 @@ jobs:
matrix:
go-version:
- 1.22.x
platform:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ root
├── <a href="./testsuite">testsuite</a>: Provides a wrapper around testify/suite.
├── <a href="./threaditer">threaditer</a>: Provides a thread-safe generic iterator for a slice.
</pre>

5 changes: 5 additions & 0 deletions docker/goreleaser/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,8 @@ RUN apt-get update && apt-get install -y nodejs
RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin

RUN rm -rf /var/lib/apt/lists/* /var/log/apt/* /tmp/* /var/tmp/*


RUN curl -fsSL https://get.namespace.so/cloud/install.sh | NS_ROOT=/usr/local sh && exit 0
ENV NS_ROOT=/usr/local/bin
ENV PATH=${PATH}:/usr/local/bin
trajan0x marked this conversation as resolved.
Show resolved Hide resolved
Loading