Skip to content

Commit

Permalink
Update deprecated usage of github action commands.
Browse files Browse the repository at this point in the history
Signed-off-by: BugDiver <vinaysh@thoughtworks.com>
  • Loading branch information
BugDiver committed Nov 18, 2020
1 parent f7ea32f commit 88422df
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 113 deletions.
221 changes: 111 additions & 110 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,120 +9,120 @@ on:
- master

jobs:
build:
name: Dotnet build

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100

- name: Dotnet unit test on windows
if: matrix.os == 'windows-latest'
run: |
./run.cmd build
./run.cmd test
- name: Dotnet unit test on ubuntu
if: matrix.os != 'windows-latest'
run: |
./run.sh build
./run.sh test
Functional-tests:

name: Dotnet FTs on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v1

- name: Setup go 1.13.1
uses: actions/setup-go@v1
with:
go-version: 1.13.1

- name: Setup java 12.x.x
uses: actions/setup-java@v1
with:
java-version: 12.x.x

- name: Install gauge on linux
if: matrix.os != 'windows-latest'
run: |
git clone https://github.com/getgauge/gauge
cd gauge
go run build/make.go --verbose
go run build/make.go --install --prefix=/tmp/
echo "::add-path::/tmp/bin"
- name: Install gauge on windows
if: matrix.os == 'windows-latest'
run: |
git clone https://github.com/getgauge/gauge
cd gauge
go run build/make.go --verbose
go run build/make.go --install
echo "::add-path::C:\Program Files\gauge\bin"
- name: Install html report
run: |
git clone --depth=1 https://github.com/getgauge/html-report
cd html-report
go run build/make.go
go run build/make.go --install
- name: Install Gauge Dotnet plugin from source on windows
if: matrix.os == 'windows-latest'
run: |
./run.cmd install
- name: Install Gauge Dotnet plugin from source on linux
if: matrix.os != 'windows-latest'
run: |
./run.sh install
- name: Clone gauge-tests
run: |
git clone --depth=1 https://github.com/getgauge/gauge-tests
- name: Run FTs on linux
if: matrix.os != 'windows-latest'
run: |
cd gauge-tests
./gradlew clean dotnetFT
- name: Run FTs on windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
cd gauge-tests
.\gradlew.bat clean dotnetFT
- uses: actions/upload-artifact@v1
if: failure()
with:
name: ft-logs-${{ matrix.os }}
path: gauge-tests/testLogs
# build:
# name: Dotnet build

# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest]

# steps:
# - uses: actions/checkout@v1
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.0.100

# - name: Dotnet unit test on windows
# if: matrix.os == 'windows-latest'
# run: |
# ./run.cmd build
# ./run.cmd test

# - name: Dotnet unit test on ubuntu
# if: matrix.os != 'windows-latest'
# run: |
# ./run.sh build
# ./run.sh test

# Functional-tests:

# name: Dotnet FTs on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# needs: build
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest]

# steps:
# - uses: actions/checkout@v1

# - name: Setup go 1.13.1
# uses: actions/setup-go@v1
# with:
# go-version: 1.13.1

# - name: Setup java 12.x.x
# uses: actions/setup-java@v1
# with:
# java-version: 12.x.x

# - name: Install gauge on linux
# if: matrix.os != 'windows-latest'
# run: |
# git clone https://github.com/getgauge/gauge
# cd gauge
# go run build/make.go --verbose
# go run build/make.go --install --prefix=/tmp/
# echo "/tmp/bin" >> $GITHUB_PATH

# - name: Install gauge on windows
# if: matrix.os == 'windows-latest'
# run: |
# git clone https://github.com/getgauge/gauge
# cd gauge
# go run build/make.go --verbose
# go run build/make.go --install
# echo "C:\Program Files\gauge\bin" >> $GITHUB_PATH

# - name: Install html report
# run: |
# git clone --depth=1 https://github.com/getgauge/html-report
# cd html-report
# go run build/make.go
# go run build/make.go --install

# - name: Install Gauge Dotnet plugin from source on windows
# if: matrix.os == 'windows-latest'
# run: |
# ./run.cmd install

# - name: Install Gauge Dotnet plugin from source on linux
# if: matrix.os != 'windows-latest'
# run: |
# ./run.sh install

# - name: Clone gauge-tests
# run: |
# git clone --depth=1 https://github.com/getgauge/gauge-tests

# - name: Run FTs on linux
# if: matrix.os != 'windows-latest'
# run: |
# cd gauge-tests
# ./gradlew clean dotnetFT

# - name: Run FTs on windows
# if: matrix.os == 'windows-latest'
# shell: pwsh
# run: |
# cd gauge-tests
# .\gradlew.bat clean dotnetFT

# - uses: actions/upload-artifact@v1
# if: failure()
# with:
# name: ft-logs-${{ matrix.os }}
# path: gauge-tests/testLogs

LSP-tests:
name: Dotnet LSP tests ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: build
# needs: build
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [windows-latest]

steps:
- uses: actions/checkout@v1
Expand All @@ -139,7 +139,7 @@ jobs:
cd gauge
go run build/make.go --verbose
go run build/make.go --install --prefix=/tmp/
echo "::add-path::/tmp/bin"
echo "/tmp/bin" >> $GITHUB_PATH
- name: Install gauge on windows
if: matrix.os == 'windows-latest'
Expand All @@ -148,11 +148,12 @@ jobs:
cd gauge
go run build/make.go --verbose
go run build/make.go --install
echo "::add-path::C:\Program Files\gauge\bin"
echo "C:\Program Files\gauge\bin" >> $GITHUB_PATH
- name: Install Gauge Dotnet plugin from source on windows
if: matrix.os == 'windows-latest'
run: |
echo $env:PATH
./run.cmd install
- name: Install Gauge Dotnet plugin from source on linux
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ jobs:
- name: Build artifacts
run: |
./run.sh package
- name: update
- name: Set Version env
run: |
cd artifacts
if [ -z "$version" ]; then
version=$(ls gauge-dotnet* | sed "s/\.[^\.]*$//" | sed "s/gauge-dotnet-//");
fi
echo "::set-env name=VERSION::$version"
echo "VERSION=$version" >> $GITHUB_ENV
- name: update
run: |
cd artifacts
echo "::set-env name=::"
artifacts=()
dir=`pwd`
for i in `ls`; do
Expand Down

0 comments on commit 88422df

Please sign in to comment.