From 3ded178e545b7fb712e59b51468e4c9a6a36fa7a Mon Sep 17 00:00:00 2001 From: Piyushh Bhutoria Date: Sat, 11 May 2024 11:30:36 +0530 Subject: [PATCH] Update Go version to 1.22.3 --- .circleci/config_continue.yml | 115 +++++++++++----------- .github/workflows/pre-commit-hook-run.yml | 2 +- .github/workflows/tests.yml | 2 +- test/docker/Dockerfile | 6 +- 4 files changed, 62 insertions(+), 63 deletions(-) diff --git a/.circleci/config_continue.yml b/.circleci/config_continue.yml index 1d6061e1..a101db71 100644 --- a/.circleci/config_continue.yml +++ b/.circleci/config_continue.yml @@ -25,7 +25,7 @@ jobs: - run: go version - run: rm -rf /etc/alternatives/java - run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java - - run: wget https://go.dev/dl/go1.18.10.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz + - run: wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz - run: go get ./... - run: (cd .circleci/ && ./doUnitTests.sh << parameters.cdi-version >>) - slack/status @@ -42,7 +42,7 @@ jobs: - run: go version - run: rm -rf /etc/alternatives/java - run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java - - run: wget https://go.dev/dl/go1.18.10.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz + - run: wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz - run: go get ./... - run: (cd .circleci/ && ./website.sh) - slack/status @@ -57,20 +57,20 @@ jobs: - run: git config --global url."https://github.com/".insteadOf ssh://git@github.com/ - run: curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash - run: | - set +e - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" - nvm install 16 - - echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV - echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV + set +e + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" + nvm install 16 + + echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV - run: node --version - run: echo "127.0.0.1 localhost.org" >> /etc/hosts - run: go version - run: rm -rf /etc/alternatives/java - run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java - - run: wget https://go.dev/dl/go1.18.10.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz + - run: wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz - run: go get ./... - run: (cd .circleci/ && ./authReact.sh) - store_artifacts: @@ -90,54 +90,53 @@ workflows: tagged-build: jobs: - test-dev-tag-as-not-passed: - filters: - tags: - only: /dev-v[0-9]+(\.[0-9]+)*/ - branches: - only: /test-cicd\/.*/ + filters: + tags: + only: /dev-v[0-9]+(\.[0-9]+)*/ + branches: + only: /test-cicd\/.*/ - test-unit: - requires: - - test-dev-tag-as-not-passed - context: - - slack-notification - filters: - tags: - only: /dev-v[0-9]+(\.[0-9]+)*/ - branches: - only: /test-cicd\/.*/ - matrix: - parameters: - cdi-version: placeholder + requires: + - test-dev-tag-as-not-passed + context: + - slack-notification + filters: + tags: + only: /dev-v[0-9]+(\.[0-9]+)*/ + branches: + only: /test-cicd\/.*/ + matrix: + parameters: + cdi-version: placeholder - test-website: - requires: - - test-dev-tag-as-not-passed - context: - - slack-notification - filters: - tags: - only: /dev-v[0-9]+(\.[0-9]+)*/ - branches: - only: /test-cicd\/.*/ + requires: + - test-dev-tag-as-not-passed + context: + - slack-notification + filters: + tags: + only: /dev-v[0-9]+(\.[0-9]+)*/ + branches: + only: /test-cicd\/.*/ - test-authreact: - requires: - - test-dev-tag-as-not-passed - context: - - slack-notification - filters: - tags: - only: /dev-v[0-9]+(\.[0-9]+)*/ - branches: - only: /test-cicd\/.*/ + requires: + - test-dev-tag-as-not-passed + context: + - slack-notification + filters: + tags: + only: /dev-v[0-9]+(\.[0-9]+)*/ + branches: + only: /test-cicd\/.*/ - test-success: - requires: - - test-unit - - test-website - - test-authreact - context: - - slack-notification - filters: - tags: - only: /dev-v[0-9]+(\.[0-9]+)*/ - branches: - ignore: /.*/ - + requires: + - test-unit + - test-website + - test-authreact + context: + - slack-notification + filters: + tags: + only: /dev-v[0-9]+(\.[0-9]+)*/ + branches: + ignore: /.*/ diff --git a/.github/workflows/pre-commit-hook-run.yml b/.github/workflows/pre-commit-hook-run.yml index a653f11f..dcb6781b 100644 --- a/.github/workflows/pre-commit-hook-run.yml +++ b/.github/workflows/pre-commit-hook-run.yml @@ -21,5 +21,5 @@ jobs: node-version: '12' - run: git init && git add --all && git -c user.name='test' -c user.email='test@example.com' commit -m 'init for pr action' - name: Install latest go - run: wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz && export PATH=$PATH:/usr/local/go/bin && rm go1.21.3.linux-amd64.tar.gz + run: wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz && export PATH=$PATH:/usr/local/go/bin && rm go1.22.3.linux-amd64.tar.gz - run: ./hooks/pre-commit.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 97fa56f4..bc70b49c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,7 +51,7 @@ jobs: - name: Setting up supertokens-root test environment run: cd ../supertokens-root && bash ./utils/setupTestEnvLocal - name: Install latest go - run: wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz && export PATH=$PATH:/usr/local/go/bin && rm go1.21.3.linux-amd64.tar.gz + run: wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz && export PATH=$PATH:/usr/local/go/bin && rm go1.22.3.linux-amd64.tar.gz - name: Run tests run: go test ./... -p 1 -v count=1 env: diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 77afee16..1fe0dab7 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,8 +1,8 @@ FROM rishabhpoddar/supertokens_website_sdk_testing RUN cd /tmp -RUN wget https://dl.google.com/go/go1.17.linux-amd64.tar.gz -RUN tar -xvf go1.17.linux-amd64.tar.gz +RUN wget https://dl.google.com/go/go1.22.3.linux-amd64.tar.gz +RUN tar -xvf go1.22.3.linux-amd64.tar.gz RUN mv go /usr/local env GOROOT /usr/local/go env GOPATH $HOME/go -env PATH $GOPATH/bin:$GOROOT/bin:$PATH \ No newline at end of file +env PATH $GOPATH/bin:$GOROOT/bin:$PATH