Skip to content

Commit

Permalink
ci: update lint action
Browse files Browse the repository at this point in the history
  • Loading branch information
h-r-k-matsumoto committed Feb 3, 2024
1 parent 131a906 commit e8148bb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ services:
depends_on:
- passenger-app
passenger-app:
image: ghcr.io/rakutentech/passenger-go-exporter/passenger-app:6.0.14
image: ghcr.io/rakutentech/passenger-go-exporter/passenger-app:6.0.20
platform: linux/x86_64
ports:
- 3000:3000
environment:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
- 6.0.20
steps:
- uses: actions/checkout@v4
- uses: engineerd/setup-kind@v0.5.0
- uses: helm/kind-action@v1.5.0
with:
version: "v0.21.0"
cluster_name: kind
- name: Kind Load Image
run: |
docker build -t passenger-go-exporter:test .
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read

jobs:
test:
name: Test
Expand All @@ -13,9 +16,12 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
Expand All @@ -28,7 +34,7 @@ jobs:
run: go test -json ./... > test.json
- name: annotate tests
if: always()
uses: guyarb/golang-test-annotations@v0.6.0
uses: guyarb/golang-test-annotations@v0.7.0
with:
test-results: test.json
lint:
Expand All @@ -38,11 +44,9 @@ jobs:
go-version: [1.20]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
stable: 'true'
go-version: '1.20'
cache: false
- uses: golangci/golangci-lint-action@v3
with:
skip-go-installation: true
3 changes: 2 additions & 1 deletion test/kubernetes/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ REPO_HOME=$(git rev-parse --show-toplevel)
kubectl delete namespace test --ignore-not-found=true --wait=true
kubectl create namespace test


# deploy
kubectl apply -k ${REPO_HOME}/test/kubernetes/test
kubectl set image -n test deployment/example example=ghcr.io/rakutentech/passenger-go-exporter/passenger-app:$PASSENGER_VERSION
Expand All @@ -15,7 +16,7 @@ kubectl -n test rollout status deploy/example
POD_IP=$(kubectl get pod -n test -o=jsonpath='{.items[0].status.podIP}')

# test
kubectl run curl -it --rm -n test --restart=Never --image=curlimages/curl:latest -- http://${POD_IP}:9768/metrics > metrics.txt
kubectl run curl -i --rm -n test --restart=Never --image=curlimages/curl:latest -- http://${POD_IP}:9768/metrics > metrics.txt
metrics=(
"passenger_go_process_count"
"passenger_go_process_processed"
Expand Down
2 changes: 1 addition & 1 deletion test/passenger-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ruby:3.3

ARG ARG_RAILS_VERSION=7.1.3
ARG ARG_RAILS_VERSION=7.0.8
ARG ARG_PASSENGER_VERSION=6.0.20
ENV RAILS_VERSION $ARG_RAILS_VERSION
ENV PASSENGER_VERSION $ARG_PASSENGER_VERSION
Expand Down

0 comments on commit e8148bb

Please sign in to comment.