Skip to content

Commit

Permalink
Improve CI
Browse files Browse the repository at this point in the history
  • Loading branch information
labianchin committed Sep 18, 2019
1 parent 63563bd commit ef93de8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ jobs:
with:
java-version: ${{ matrix.java_version }}
- name: Build with Maven
run: mvn clean verify -Pcoverage -Ppack --file pom.xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./dbeam-core/target/site/jacoco/jacoco.xml
flags: unittests
name: codecov-umbrella
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |
mvn clean verify -Pcoverage -Ppack --file pom.xml --batch-mode -Dsytle.colors=always --errors
bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -F unittests -f ./dbeam-core/target/site/jacoco/jacoco.xml -n codecov-umbrella
- name: End to end tests
run: ./e2e/e2e.sh
# # https://github.com/arduino/arduino-cli/blob/5e1627de181e6737a874c8b3ea356cec248cc74c/.github/workflows/test.yaml
Expand All @@ -49,8 +46,11 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
export GPG_TTY=$(tty)
export DISPLAY=:0
echo "$GPG_KEY" | base64 --decode --ignore-garbage | gpg --batch --fast-import -
mvn --settings sonatype-settings.xml -DskipTests -Prelease deploy
echo "test" | gpg --clearsign
mvn --settings sonatype-settings.xml -DskipTests -Prelease deploy --batch-mode -Dsytle.colors=always --errors
rm -rf ~/.gnupg
- name: Release
uses: docker://softprops/action-gh-release
Expand Down
4 changes: 2 additions & 2 deletions e2e/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ startPostgres() {
-v /tmp/pgdata:/var/lib/postgresql/data \
-p 54321:5432/tcp -d postgres:10 || docker start dbeam-postgres
# https://stackoverflow.com/questions/35069027/docker-wait-for-postgresql-to-be-running
docker run -i --rm --link dbeam-postgres:postgres -e PGPASSWORD=mysecretpassword postgres:10.7 timeout 45s bash -ic 'until psql -h postgres -U postgres dbeam_test -c "select 1"; do sleep 1; done; echo "psql up and running.."'
time docker run -i --rm --link dbeam-postgres:postgres -e PGPASSWORD=mysecretpassword postgres:10.7 timeout 45s bash -ic 'until psql -h postgres -U postgres dbeam_test -c "select 1"; do sleep 1; done; echo "psql up and running.."'
sleep 3
cat "$SCRIPT_PATH/ddl.sql" \
time cat "$SCRIPT_PATH/ddl.sql" \
| docker run -i --rm --link dbeam-postgres:postgres -e PGPASSWORD=mysecretpassword postgres:10 psql -h postgres -U postgres dbeam_test
echo '\d' | docker run -i --rm --link dbeam-postgres:postgres -e PGPASSWORD=mysecretpassword postgres:10 psql -h postgres -U postgres dbeam_test
}
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit ef93de8

Please sign in to comment.