Skip to content
Permalink
Browse files

Update gh pages on release (#413)

  • Loading branch information...
tsiq-karold committed Aug 15, 2019
1 parent b559370 commit a22f0be833ad1c8cc2dd235c88a0be812f8c83eb
@@ -1,13 +1,30 @@
language: java

cache:
directories:
- $HOME/.m2
- $HOME/.npm
- node_modules

dist: xenial

services:
- xvfb

addons:
chrome: stable
apt:
packages:
- graphviz

# disables the default install step which is mvn install skipping tests
install: true

script: mvn -B package

deploy:
- provider: script
script: ./update-gh-pages.sh
on:
all_branches: true
tags: true
@@ -760,4 +760,11 @@
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
</project>
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

set -eux

GIT_URL=$(git config --get remote.origin.url)
GH_PAGES_BRANCH=gh-pages

ROOT_DIR=$(dirname $0)
GH_PAGES_DIR=$ROOT_DIR/gh-pages

# Find the webtau version
WEBTAU_VERSION=$(grep \<version\> $ROOT_DIR/pom.xml | head -1 | cut -d'>' -f2 | cut -d'<' -f1)

# Cleanup on exit
cleanup() {
rm -rf $GH_PAGES_DIR
}
trap cleanup EXIT

git clone $GIT_URL --branch $GH_PAGES_BRANCH --single-branch --depth 1 $GH_PAGES_DIR

# Cleanup existing pages
rm -rf $GH_PAGES_DIR/guide/*
rm -rf $GH_PAGES_DIR/znaisrc/*

# Copy in new pages
cp -r $ROOT_DIR/webtau-docs/target/guide/* $GH_PAGES_DIR/guide/
cp -r $ROOT_DIR/webtau-docs/target/znaisrc/* $GH_PAGES_DIR/znaisrc/

cd $GH_PAGES_DIR

# Tell git about changed, new and deleted pages
git add -A

git commit -m "Updating docs for $WEBTAU_VERSION"
git push

@@ -26,7 +26,16 @@

<artifactId>webtau-docs</artifactId>

<dependencies>
<dependency>
<groupId>com.twosigma.webtau</groupId>
<artifactId>webtau-feature-testing</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<testOutputDirectory>mdoc/test-artifacts</testOutputDirectory>
<resources>
<resource>
<directory>${project.basedir}/pre-filter</directory>
@@ -42,6 +51,56 @@
<escapeString>\</escapeString>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules>
<dependencyConvergence />
<banDuplicateClasses>
<findAllDuplicates>true</findAllDuplicates>
<ignoreWhenIdentical>true</ignoreWhenIdentical>
<ignoreClasses>
<!--tomcat embedded ships javax annotations internally-->
<ignoreClass>javax.persistence.*</ignoreClass>
<ignoreClass>javax.servlet.*</ignoreClass>
<ignoreClass>org.apache.commons.*</ignoreClass>
</ignoreClasses>
</banDuplicateClasses>
</rules>
</configuration>
</plugin>

<plugin>
<groupId>com.twosigma.znai</groupId>
<artifactId>znai-maven-plugin</artifactId>
<version>0.16</version>
<executions>
<execution>
<id>guide</id>
<phase>prepare-package</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<docId>guide</docId>
</configuration>
</execution>
<execution>
<id>export</id>
<phase>prepare-package</phase>
<goals>
<goal>export</goal>
</goals>
</execution>
</executions>
<configuration>
<deployRoot>${project.build.directory}</deployRoot>
<exportRoot>${project.build.directory}/znaisrc</exportRoot>
<sourceRoot>${project.basedir}/webtau</sourceRoot>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
@@ -3,7 +3,7 @@
Robust tests don't specify the full URL of an application under test.
Instead you only pass a relative URL to functions like `open`.

:include-groovy: scenarios/ui/Basic.groovy
:include-groovy: scenarios/ui/basic.groovy

Define base URL portion either inside a `webtau.cfg` file

@@ -1,4 +1,6 @@
url = "http://localhost:8180"

windowWidth = 1000
windowHeight = 240
windowHeight = 240

docPath = "doc-artifacts/ui"
@@ -71,8 +71,7 @@ class WebTauEndToEndTestRunner implements StepReporter, StandaloneTestListener {

try {
def args = ['--workingDir=examples', '--config=' + configFileName,
'--reportPath=' + reportPath,
'--docPath=doc-artifacts/ui']
'--reportPath=' + reportPath]
args.addAll(Arrays.asList(additionalArgs))
args.add(testPath.toString())

@@ -100,11 +100,4 @@
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
</project>
@@ -167,7 +167,9 @@
<executions>
<execution>
<id>compile</id>
<goals> <goal>compile</goal> </goals>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
@@ -177,7 +179,9 @@
</execution>
<execution>
<id>test-compile</id>
<goals> <goal>test-compile</goal> </goals>
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>

0 comments on commit a22f0be

Please sign in to comment.
You can’t perform that action at this time.