diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml new file mode 100644 index 00000000..92168777 --- /dev/null +++ b/.github/workflows/functional-tests.yml @@ -0,0 +1,75 @@ +name: functional-tests + +on: [push, pull_request] + +jobs: + linux: + runs-on: ubuntu-latest + env: + TAGS: js + GAUGE_TELEMETRY_ENABLED: false + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js + uses: actions/setup-node@v1 + + - name: Init submodule + run: | + git submodule init + - name: Update submodule + run: | + git submodule update + - name: install + run: | + npm install + - name: Install gauge + run: | + mkdir ${HOME}/bin + curl https://raw.githubusercontent.com/getgauge/gauge/master/build/download.sh > install.sh + sh install.sh --location=${HOME}/bin + echo ::add-path::${HOME}/bin + - name: Install gauge-js + run: | + npm run installPlugin + - name: Run FTs + run: | + git clone https://github.com/getgauge/gauge-tests + cd gauge-tests + gauge install + ./gradlew clean jsFT + + windows: + runs-on: windows-latest + env: + TAGS: js + GAUGE_TELEMETRY_ENABLED: false + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js + uses: actions/setup-node@v1 + + - name: Init submodule + run: | + git submodule init + - name: Update submodule + run: | + git submodule update + - name: install + run: | + npm install + - name: Install gauge + run: | + choco install gauge + - name: Install gauge-js + run: | + set PATH="C:\\Program Files\\gauge\\bin";%PATH% + npm run installPlugin + - name: Run FTs + run: | + set PATH="C:\\Program Files\\gauge\\bin";%PATH% + git clone https://github.com/getgauge/gauge-tests + cd gauge-tests + gauge install + gradlew.bat clean jsFT diff --git a/.github/workflows/lsp-tests.yml b/.github/workflows/lsp-tests.yml new file mode 100644 index 00000000..ba6bf64a --- /dev/null +++ b/.github/workflows/lsp-tests.yml @@ -0,0 +1,77 @@ +name: lsp-tests + +on: [push, pull_request] + +jobs: + linux: + runs-on: ubuntu-latest + env: + TAGS: js + GAUGE_TELEMETRY_ENABLED: false + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js + uses: actions/setup-node@v1 + + - name: Init submodule + run: | + git submodule init + - name: Update submodule + run: | + git submodule update + - name: install + run: | + npm install + - name: Install gauge stable + run: | + mkdir ${HOME}/bin + curl https://raw.githubusercontent.com/getgauge/gauge/master/build/download.sh > install.sh + sh install.sh --location=${HOME}/bin + echo ::add-path::${HOME}/bin + - name: Install gauge-js + run: | + npm run installPlugin + - name: Run lsp tests + run: | + git clone https://github.com/getgauge/gauge-lsp-tests + cd gauge-lsp-tests + npm install + gauge install + gauge run --tags='!knownIssue & (actions_on_project_load | actions_on_file_edit)' --env=js-wd + + windows: + runs-on: windows-latest + env: + TAGS: js + GAUGE_TELEMETRY_ENABLED: false + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js + uses: actions/setup-node@v1 + + - name: Init submodule + run: | + git submodule init + - name: Update submodule + run: | + git submodule update + - name: install + run: | + npm install + - name: Install gauge + run: | + choco install gauge + - name: Install gauge-js + run: | + set PATH="C:\\Program Files\\gauge\\bin";%PATH% + npm run installPlugin + - name: Run lsp tests + run: | + set PATH="C:\\Program Files\\gauge\\bin";%PATH% + git clone https://github.com/getgauge/gauge-lsp-tests + cd gauge-lsp-tests + npm install + gauge install + gauge run --tags='!knownIssue & (actions_on_project_load | actions_on_file_edit)' --env=js-wd diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..7fe5feec --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: tests + +on: [push, pull_request] + +jobs: + test: + name: Node ${{ matrix.node_version }} ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node_version: [10, 12] + + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + version: ${{ matrix.node_version }} + + - name: Init submodule + run: | + git submodule init + - name: Update submodule + run: | + git submodule update + - name: install + run: | + npm install + - name: unit-tests + run: | + npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 07a1ebd2..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -os: - - osx - - linux -language: node_js -node_js: - - "lts/*" - - "9" - - "node" -install: - - npm install -env: - - GAUGE_TELEMETRY_ENABLED=false GAUGE_PREFIX=/tmp TERM=dumb -script: - - npm test - - cd .. - - git clone --depth=1 https://github.com/getgauge/gauge-tests - - cd gauge-tests - - curl -sSfL https://raw.githubusercontent.com/getgauge/infrastructure/master/nightly_scripts/install_latest_gauge_nightly.sh | bash - - export PATH=/tmp/bin:$PATH - - gauge -v - - cd $TRAVIS_BUILD_DIR - - npm run installPlugin - - cd .. - - cd gauge-tests - - gauge config gauge_repository_url https://raw.githubusercontent.com/getgauge/gauge-nightly-repository/master/ - - gauge install - - gauge -v - - ./gradlew clean jsFT - diff --git a/README.md b/README.md index 3ea60777..15abeaa5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Gauge-JS -[![Build Status - Travis CI](https://travis-ci.org/getgauge/gauge-js.svg?branch=master)](https://travis-ci.org/getgauge/gauge-js) -[![Build status](https://ci.appveyor.com/api/projects/status/bpxrbrexfeeff6r6/branch/master?svg=true)](https://ci.appveyor.com/project/getgauge/gauge-js/branch/master) +[![Actions Status](https://github.com/bugdiver/gauge-ts/workflows/tests/badge.svg)](https://github.com/getgauge/gauge-js/actions) +[![Actions Status](https://github.com/bugdiver/gauge-ts/workflows/functional-tests/badge.svg)](https://github.com/getgauge/gauge-js/actions) +[![Actions Status](https://github.com/bugdiver/gauge-ts/workflows/lsp-tests/badge.svg)](https://github.com/getgauge/gauge-js/actions) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) This project adds Javascript [language plugin](https://docs.gauge.org/plugins.html#language-reporting-plugins) for [gauge](http://getgauge.io). diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 718d7a54..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,61 +0,0 @@ -version: 1.0.{build} -init: -- ps: >- - Add-Type -AssemblyName System.IO.Compression.FileSystem - - if (!(Test-Path -Path "C:\maven" )) { - (new-object System.Net.WebClient).DownloadFile('http://www.us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip', 'C:\maven-bin.zip') - [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven") - } -cache: -- C:\maven\ -- C:\Users\appveyor\.m2 -environment: - GAUGE_TELEMETRY_ENABLED: false - GAUGE_PREFIX: C:\Program Files\Gauge\bin -install: - - git submodule init - - git submodule update - - ps: Install-Product node 10 - - npm install -build_script: -- ps: >- - $env:Path="$env:ProgramFiles\Gauge\bin;C:\maven\apache-maven-3.3.9\bin;" + [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") - - Write-Host "PATH : $($env:PATH)" - - $env:M2_HOME="C:\maven\apache-maven-3.3.9\" - - mvn --version - - npm version - - npm test - - if ($LastExitCode -ne 0) { - $host.SetShouldExit($LastExitCode) - } - - git clone --depth=1 https://github.com/getgauge/gauge-tests - - cd gauge-tests - - Invoke-WebRequest -Uri "https://raw.githubusercontent.com/getgauge/infrastructure/master/nightly_scripts/install_latest_gauge_nightly.ps1" -OutFile install_latest_gauge_nightly.ps1 - - .\install_latest_gauge_nightly.ps1 - - cd $env:APPVEYOR_BUILD_FOLDER - - npm run installPlugin - - cd gauge-tests - - gauge -v - - gauge config gauge_repository_url https://raw.githubusercontent.com/getgauge/gauge-nightly-repository/master/ - - gauge install - - gauge -v - -- gradlew.bat clean jsFT