Skip to content

Commit

Permalink
Use GitHub action to setup Go
Browse files Browse the repository at this point in the history
  • Loading branch information
jzvikart committed Oct 29, 2023
1 parent 5378153 commit 84256cf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/integrationtest1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 'v16.20.2'
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.18.10'
- name: Set up linux environment
run: # installs development tools and updates .bash_profile
bash test/integration/setup-linux-environment.sh
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integrationtest2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 'v16.20.2'
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.18.10'
- name: Set up linux environment
run: # installs development tools and updates .bash_profile
bash test/integration/setup-linux-environment.sh
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integrationtest3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 'v16.20.2'
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.18.10'
- name: Set up linux environment
run: # installs development tools and updates .bash_profile
bash test/integration/setup-linux-environment.sh
Expand Down
4 changes: 0 additions & 4 deletions test/integration/setup-linux-environment-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ groupadd -f docker
usermod -aG docker ${dockeruser}

curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod a+x /usr/local/bin/docker-compose

# install go
wget -O /tmp/go.tar.gz https://golang.org/dl/go1.18.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf /tmp/go.tar.gz
10 changes: 5 additions & 5 deletions test/integration/setup-linux-environment-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ npm install -g truffle @truffle/hdwallet-provider ganache-cli || true
sudo npm install -g dotenv

# set up environment vars in .bash_profile
echo 'export GOPATH=$HOME/go' >> ~/.bash_profile
echo 'export GOBIN=$GOPATH/bin' >> ~/.bash_profile
echo 'export GOROOT=/usr/local/go' >> ~/.bash_profile
echo 'export PATH=$GOROOT/bin:$PATH' >> ~/.bash_profile
echo 'export PATH=$GOBIN:$PATH' >> ~/.bash_profile
#echo 'export GOPATH=$HOME/go' >> ~/.bash_profile
#echo 'export GOBIN=$GOPATH/bin' >> ~/.bash_profile
#echo 'export GOROOT=/usr/local/go' >> ~/.bash_profile
#echo 'export PATH=$GOROOT/bin:$PATH' >> ~/.bash_profile
#echo 'export PATH=$GOBIN:$PATH' >> ~/.bash_profile
echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bash_profile

echo '. ~/.bash_profile' >> ~/.bashrc
Expand Down
2 changes: 2 additions & 0 deletions test/integration/setup-linux-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ scriptdir=$(dirname $0)

sudo bash $scriptdir/setup-linux-environment-root.sh $(id -u -n)
bash $scriptdir/setup-linux-environment-user.sh

env | sort

0 comments on commit 84256cf

Please sign in to comment.