From 3b565a4c49bd23f0b38c4f9097bc741a9177f773 Mon Sep 17 00:00:00 2001 From: Zabil Cheriya Maliackal Date: Wed, 2 Dec 2020 13:48:51 +0000 Subject: [PATCH 1/4] Update build scripts and remove deprecations Signed-off-by: Zabil Cheriya Maliackal --- .github/workflows/tests.yml | 56 ++++++++++--------------------------- 1 file changed, 14 insertions(+), 42 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e0d6516..417de73 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,15 +48,15 @@ jobs: run: | $COMMIT_HASH = node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" $ruby_plugin_path = (pwd).Path - echo "::set-env name=RUBY_PLUGIN_BRANCH::$COMMIT_HASH" - echo "::set-env name=LOCAL_RUBY_PLUGIN_PATH::$ruby_plugin_path" + echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV + echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV - name: Setup env if: matrix.os != 'windows-latest' run: | export COMMIT_HASH=`node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))"` - echo "::set-env name=RUBY_PLUGIN_BRANCH::$COMMIT_HASH" - echo "::set-env name=LOCAL_RUBY_PLUGIN_PATH::$(pwd)" + echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV + echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV - name: Set up Ruby 2.6.x uses: actions/setup-ruby@v1 @@ -73,23 +73,9 @@ jobs: with: java-version: 12.x.x - - name: Install gauge - if: matrix.os != 'windows-latest' - run: | - git clone --depth=1 https://github.com/getgauge/gauge.git - cd gauge - go run build/make.go --verbose - go run build/make.go --install --prefix=/tmp/ - echo "::add-path::/tmp/bin" - - - name: Install gauge - if: matrix.os == 'windows-latest' - run: | - git clone --depth=1 https://github.com/getgauge/gauge.git - cd gauge - go run build/make.go --verbose - go run build/make.go --install - echo "::add-path::C:\\Program Files\\gauge\\bin" + - uses: getgauge/setup-gauge@master + with: + gauge-version: master - name: Install bundler run: | @@ -138,15 +124,15 @@ jobs: run: | $COMMIT_HASH = node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" $ruby_plugin_path = (pwd).Path - echo "::set-env name=RUBY_PLUGIN_BRANCH::$COMMIT_HASH" - echo "::set-env name=LOCAL_RUBY_PLUGIN_PATH::$ruby_plugin_path" + echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV + echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV - name: Setup env if: matrix.os != 'windows-latest' run: | export COMMIT_HASH=`node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))"` - echo "::set-env name=RUBY_PLUGIN_BRANCH::$COMMIT_HASH" - echo "::set-env name=LOCAL_RUBY_PLUGIN_PATH::$(pwd)" + echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV + echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV - name: Set up Ruby 2.6.x uses: actions/setup-ruby@v1 @@ -158,23 +144,9 @@ jobs: with: go-version: 1.13.1 - - name: Install gauge - if: matrix.os != 'windows-latest' - run: | - git clone --depth=1 https://github.com/getgauge/gauge.git - cd gauge - go run build/make.go --verbose - go run build/make.go --install --prefix=/tmp/ - echo "::add-path::/tmp/bin" - - - name: Install gauge - if: matrix.os == 'windows-latest' - run: | - git clone --depth=1 https://github.com/getgauge/gauge.git - cd gauge - go run build/make.go --verbose - go run build/make.go --install - echo "::add-path::C:\\Program Files\\gauge\\bin" + - uses: getgauge/setup-gauge@master + with: + gauge-version: master - name: Install bundler run: | From 33b57bac99ac892beda224581bba3fda2cc2b8f9 Mon Sep 17 00:00:00 2001 From: Zabil Cheriya Maliackal Date: Wed, 2 Dec 2020 14:25:44 +0000 Subject: [PATCH 2/4] Use EOF delimiter to add env variables Signed-off-by: Zabil Cheriya Maliackal --- .github/workflows/tests.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 417de73..2777c50 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,17 +46,22 @@ jobs: if: matrix.os == 'windows-latest' shell: pwsh run: | - $COMMIT_HASH = node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" - $ruby_plugin_path = (pwd).Path - echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV - echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV + echo 'RUBY_PLUGIN_BRANCH<> $GITHUB_ENV + node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV + echo 'LOCAL_RUBY_PLUGIN_PATH<> $GITHUB_ENV + (pwd).Path >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV - name: Setup env if: matrix.os != 'windows-latest' run: | - export COMMIT_HASH=`node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))"` - echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV - echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV + echo 'RUBY_PLUGIN_BRANCH<> $GITHUB_ENV + node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV + echo 'LOCAL_RUBY_PLUGIN_PATH<> $GITHUB_ENV + (pwd).Path >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV - name: Set up Ruby 2.6.x uses: actions/setup-ruby@v1 From 07aa21c470f36571a9d27e368f00b8a3e75d0c8e Mon Sep 17 00:00:00 2001 From: Zabil Cheriya Maliackal Date: Wed, 2 Dec 2020 14:36:14 +0000 Subject: [PATCH 3/4] Fix cross platform issues Signed-off-by: Zabil Cheriya Maliackal --- .github/workflows/tests.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2777c50..13bba70 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,22 +46,17 @@ jobs: if: matrix.os == 'windows-latest' shell: pwsh run: | - echo 'RUBY_PLUGIN_BRANCH<> $GITHUB_ENV - node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" >> $GITHUB_ENV - echo 'EOF' >> $GITHUB_ENV - echo 'LOCAL_RUBY_PLUGIN_PATH<> $GITHUB_ENV - (pwd).Path >> $GITHUB_ENV - echo 'EOF' >> $GITHUB_ENV + $COMMIT_HASH = node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" + $ruby_plugin_path = (pwd).Path + echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV + echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV - name: Setup env if: matrix.os != 'windows-latest' run: | - echo 'RUBY_PLUGIN_BRANCH<> $GITHUB_ENV - node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))" >> $GITHUB_ENV - echo 'EOF' >> $GITHUB_ENV - echo 'LOCAL_RUBY_PLUGIN_PATH<> $GITHUB_ENV - (pwd).Path >> $GITHUB_ENV - echo 'EOF' >> $GITHUB_ENV + export COMMIT_HASH=`node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))"` + echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV + echo "LOCAL_RUBY_PLUGIN_PATH=$(pwd)" >> $GITHUB_ENV - name: Set up Ruby 2.6.x uses: actions/setup-ruby@v1 From 3c6b2cd559d66bfab1a14c30b330c64726626b05 Mon Sep 17 00:00:00 2001 From: Zabil Cheriya Maliackal Date: Wed, 2 Dec 2020 14:45:41 +0000 Subject: [PATCH 4/4] Use the right path variable Signed-off-by: Zabil Cheriya Maliackal --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 13bba70..bb5a418 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -132,7 +132,7 @@ jobs: run: | export COMMIT_HASH=`node -e "console.log((process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF).replace(/refs\/heads\//,''))"` echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV - echo "LOCAL_RUBY_PLUGIN_PATH=$ruby_plugin_path" >> $GITHUB_ENV + echo "LOCAL_RUBY_PLUGIN_PATH=$(pwd)" >> $GITHUB_ENV - name: Set up Ruby 2.6.x uses: actions/setup-ruby@v1