From f40a377eded6501592521684f9ced72397df7383 Mon Sep 17 00:00:00 2001 From: jdknives Date: Tue, 1 Aug 2023 14:45:15 +0200 Subject: [PATCH 1/6] Fix Docker builds and add Github actions workflow Updated nvm version in Docker image and added arg to build specifically for Linux/Amd64 to avoid having an exec error on run in deployment. --- .github/workflows/test.yaml | 26 ++++++++++++++++++++++++++ angular.json | 3 ++- docker/images/Dockerfile | 6 +++--- e2e/test-fixtures/blockchain-180.db | Bin 1048576 -> 1048576 bytes 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..e7aa78b5 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,26 @@ +name: Test +run-name: test +on: [push] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.19.x + - uses: actions/checkout@v3 + - name: Install requirements + run: | + nvm install 14.20 + go get -t ./... + make install-linters + npn install + - name: make check + run: make check + - name: make lint-ts + run: make lint-ts + - name: make build-ng + run: make build-ng + - name: make check-ui + run: make check-ui + diff --git a/angular.json b/angular.json index 89c1a435..d40af891 100644 --- a/angular.json +++ b/angular.json @@ -134,6 +134,7 @@ "cli": { "schematicCollections": [ "@angular-eslint/schematics" - ] + ], + "analytics": false } } diff --git a/docker/images/Dockerfile b/docker/images/Dockerfile index d15eca3c..f1f321b6 100644 --- a/docker/images/Dockerfile +++ b/docker/images/Dockerfile @@ -1,6 +1,6 @@ # skycoin build # reference https://github.com/skycoin/skycoin -FROM golang:1.10.2-stretch AS build +FROM --platform=linux/amd64 golang:1.10.2-stretch AS build # dirs RUN mkdir -p $GOPATH/src/github.com/skycoin/ @@ -17,8 +17,8 @@ RUN ln -sf /bin/bash /bin/sh # install node, explorer dependencies build Angular's project RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && \ source /root/.profile && \ - nvm install 10.16 && \ - nvm use 10.16 && \ + nvm install 14.20 && \ + nvm use 14.20 && \ cd $GOPATH/src/github.com/skycoin/skycoin-explorer && \ npm install && \ npm run build diff --git a/e2e/test-fixtures/blockchain-180.db b/e2e/test-fixtures/blockchain-180.db index 2a80bf2f4a5c054ab1b5c5984d4d4fb4d553f1fe..59ab8fa873c3214b61b7f8f6119a39c6faff014d 100755 GIT binary patch delta 206 zcmZo@aA;_7nBX8#!pZ;!Q*Tr)J?pYy;>N)B{FDFl8%`5o<`AC=kz*)^DoU=mXn364 zI$iNT)BTMJm-sd*a6H(~;lRYj#ArBue zOd>pO0*u=Pn1qb5D4cMO_3%ER!gioSAZ7+)79eH?Vm2UV2VxE&<^*CcAm#>Q9w6og LVm_eZ{33e*s9s6h delta 176 zcmZo@aA;_7nBc%ai-iFU&TL*DvzXOx`bA4d(~Su={F4L>rZ93y%!J4?%!DfYyv>$N zpwwpN#=!OboBzvmKA6rSz$~y?;=l|3HUY+M0!%_ij0V&9H?mKk{(+H^Z~G1=Mjb|u zCz45Rna|#fw!d*^0%B$$W&vVWAZ7z%b|B^eVoo6D0%C3;<^f_}Am-ct#+hGa4*)}g BJ=g#M From e54e325a2751246e80542202edb890743cd4349d Mon Sep 17 00:00:00 2001 From: jdknives Date: Tue, 1 Aug 2023 14:46:08 +0200 Subject: [PATCH 2/6] Deprecate travis CI builds --- .travis.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e9faf68c..00000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: go -dist: xenial - -go: - - "1.18.x" - -env: - - SKYCOIN_ADDR=http://172.17.0.2:6420 - -services: - - docker - -addons: - chrome: stable - -before_install: - - nvm install 14.20 - -install: - - go get -t ./... - - make install-linters - - npm install - -script: - - make check - - make lint-ts - - make build-ng - - make check-ui - -notifications: - # https://github.com/kvld/travisci-telegram TravisCI Telegram Bot integration - webhooks: https://fathomless-fjord-24024.herokuapp.com/notify From e2fc52bae486b19fed0e6c8cdda1ac06b9cc49ea Mon Sep 17 00:00:00 2001 From: jdknives Date: Tue, 1 Aug 2023 16:23:29 +0200 Subject: [PATCH 3/6] Install nvm in github actions --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e7aa78b5..5e8226e4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,6 +11,7 @@ jobs: - uses: actions/checkout@v3 - name: Install requirements run: | + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash nvm install 14.20 go get -t ./... make install-linters From 9007f22ab241053dec92650671e33f272653b267 Mon Sep 17 00:00:00 2001 From: jdknives Date: Tue, 1 Aug 2023 16:26:33 +0200 Subject: [PATCH 4/6] Source nvm --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5e8226e4..2d0ce02e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,6 +12,7 @@ jobs: - name: Install requirements run: | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash + export NVM_DIR="$HOME/.nvm" nvm install 14.20 go get -t ./... make install-linters From 18a89a473b213079188059bd51f32a58b5300e52 Mon Sep 17 00:00:00 2001 From: jdknives Date: Tue, 1 Aug 2023 16:29:15 +0200 Subject: [PATCH 5/6] Specify node version directly --- .github/workflows/test.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2d0ce02e..1afa284a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,11 +9,14 @@ jobs: with: go-version: 1.19.x - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + # Version Spec of the version to use in SemVer notation. + # It also emits such aliases as lts, latest, nightly and canary builds + # Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node + node-version: '14.20' - name: Install requirements run: | - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash - export NVM_DIR="$HOME/.nvm" - nvm install 14.20 go get -t ./... make install-linters npn install From 769cec64edba6a7c65feda5f2cb40d46f504ecdd Mon Sep 17 00:00:00 2001 From: jdknives Date: Tue, 1 Aug 2023 16:30:00 +0200 Subject: [PATCH 6/6] Fix typo --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1afa284a..9ba2f254 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,7 @@ jobs: run: | go get -t ./... make install-linters - npn install + npm install - name: make check run: make check - name: make lint-ts