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

Remove v1 codebase #167

Merged
merged 5 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
61 changes: 5 additions & 56 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI

env:
go-version: '1.22.3'
go-version: '1.23.0'

# Trigger the workflow on all pull requests, and on push to specific branches
on:
Expand Down Expand Up @@ -31,7 +31,6 @@ jobs:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
# should not take more than 4-6 mins
timeout-minutes: 10
steps:
- uses: actions/setup-go@v3
Expand All @@ -42,63 +41,13 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.57.1
version: v1.60.3
only-new-issues: true
args: --timeout=3m

unittests_api:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ env.go-version }}
- name: start db
run: make ci_up
- name: unit test_api
run: make test_api

unittests_collector:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ env.go-version }}
- name: start db
run: make ci_up
- name: unit test_collector
run: make test_collector

unittests_pkg:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ env.go-version }}
- name: start db
run: make ci_up
- name: unit test_pkg
run: make test_pkg
args: --timeout=10m --config=.golangci.yml --out-format=github-actions --issues-exit-code=0

docker-push:
runs-on: ubuntu-latest
needs: golangci
steps:
- uses: actions/checkout@v2

Expand All @@ -118,6 +67,6 @@ jobs:
with:
context: .
repository: spacemeshos/explorer-stats-api-dev
file: ./Dockerfile.api
file: ./Dockerfile
push: true
tags: ${{ steps.meta_statsapi.outputs.tags }}
30 changes: 7 additions & 23 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,16 @@ on:
types: [published]

jobs:

publish:
docker-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Docker meta apiserver
id: meta_apiserver
- name: Docker meta stats api
id: meta_statsapi
uses: docker/metadata-action@v4
with:
images: spacemeshos/explorer-apiserver

- name: Docker meta collector
id: meta_collector
uses: docker/metadata-action@v4
with:
images: spacemeshos/explorer-collector
images: spacemeshos/explorer-stats-api

- name: Login to DockerHub
uses: docker/login-action@v1
Expand All @@ -32,16 +25,7 @@ jobs:
- uses: docker/build-push-action@v2
with:
context: .
repository: spacemeshos/explorer-apiserver
file: ./Dockerfile.apiserver
push: true
tags: ${{ steps.meta_apiserver.outputs.tags }}

- uses: docker/build-push-action@v2
with:
context: .
repository: spacemeshos/explorer-collector
file: ./Dockerfile.collector
repository: spacemeshos/explorer-stats-api
file: ./Dockerfile
push: true
tags: ${{ steps.meta_collector.outputs.tags }}

tags: ${{ steps.meta_statsapi.outputs.tags }}
Loading
Loading