Skip to content

Commit 5adf63d

Browse files
Move testing part out of the main image - so changing in devstats don't need to rebuild image but uses code committed to the repos
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent 505ebd9 commit 5adf63d

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

images/Dockerfile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ ADD tests/ACCC4CF8.asc .
88
RUN sudo apt-key add ACCC4CF8.asc
99
ADD tests/pgdg.list /etc/apt/sources.list.d/pgdg.list
1010
RUN sudo apt update -y && sudo apt -y install postgresql-11
11-
RUN go get -u github.com/cncf/devstatscode && go get -d github.com/cncf/devstats && go get -u golang.org/x/lint/golint && go get -u golang.org/x/tools/cmd/goimports && go get -u github.com/jgautheron/goconst/cmd/goconst && go get -u github.com/jgautheron/usedexports && go get -u github.com/kisielk/errcheck && go get -u github.com/olivere/elastic && go get -u gopkg.in/yaml.v2
11+
RUN go get -u golang.org/x/lint/golint && go get -u golang.org/x/tools/cmd/goimports && go get -u github.com/jgautheron/goconst/cmd/goconst && go get -u github.com/jgautheron/usedexports && go get -u github.com/kisielk/errcheck && go get -u github.com/olivere/elastic && go get -u gopkg.in/yaml.v2
1212
ADD tests/test.sh .
1313
CMD ./test.sh

tests/test.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ sudo -u postgres psql gha -c "create user ro_user with password 'pwd'" || exit 6
1111
sudo -u postgres psql gha -c 'grant all privileges on database "gha" to ro_user' || exit 7
1212
sudo -u postgres psql gha -c "create user devstats_team with password 'pwd'" || exit 8
1313
sudo -u postgres psql gha -c 'grant all privileges on database "gha" to devstats_team' || exit 9
14-
cd /go/src/github.com/cncf/devstatscode || exit 10
15-
make || exit 11
16-
make test || exit 12
17-
GHA2DB_PROJECT=kubernetes GHA2DB_LOCAL=1 PG_PASS=pwd ./dbtest.sh || exit 13
18-
cd /go/src/github.com/cncf/devstats || exit 14
19-
make check || exit 15
20-
PG_PASS=pwd make test || exit 16
14+
go get -u github.com/cncf/devstatscode || exit 10
15+
go get -d github.com/cncf/devstats || exit 11
16+
cd /go/src/github.com/cncf/devstatscode || exit 12
17+
make || exit 13
18+
make test || exit 14
19+
GHA2DB_PROJECT=kubernetes GHA2DB_LOCAL=1 PG_PASS=pwd ./dbtest.sh || exit 15
20+
cd /go/src/github.com/cncf/devstats || exit 16
21+
make check || exit 17
22+
PG_PASS=pwd make test || exit 18

0 commit comments

Comments
 (0)