Skip to content

Added tests related to fixing issues #28 and #83. #160

Added tests related to fixing issues #28 and #83.

Added tests related to fixing issues #28 and #83. #160

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows us to run this workflow through an API call
repository_dispatch:
types: [rebuild]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Checkout ${{ github.ref }}
uses: actions/checkout@master
with:
ssh-key: ${{ secrets.SUBMODULE_CONTENT_PULL_KEY }}
submodules: 'recursive'
- name: Build with Maven
run: mvn clean install
# SSH Setup
- if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/comp') && github.event_name == 'push'
name: Setup SSH
uses: webfactory/[email protected]
with:
# Private key required to access the host
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/comp') && github.event_name == 'push'
name: Add SSH known hosts
run: echo "${ROBOSTAR_WEB_HOST} ${ROBOSTAR_WEB_SSH_FINGERPRINT_TYPE} ${ROBOSTAR_WEB_SSH_FINGERPRINT}" >> ~/.ssh/known_hosts
env:
ROBOSTAR_WEB_HOST: ${{ secrets.ROBOSTAR_WEB_HOST }}
ROBOSTAR_WEB_SSH_FINGERPRINT: ${{ secrets.ROBOSTAR_WEB_SSH_FINGERPRINT }}
ROBOSTAR_WEB_SSH_FINGERPRINT_TYPE: ${{ secrets.ROBOSTAR_WEB_SSH_FINGERPRINT_TYPE }}
- if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/comp') && github.event_name == 'push'
id: deploy
name: Deploy
uses: UoY-RoboStar/ga-eclipse-deploy@master
with:
remote-host: ${{ secrets.ROBOSTAR_WEB_HOST }}
remote-user: ${{ secrets.ROBOSTAR_WEB_USER }}
remote-root: ${{ secrets.ROBOSTAR_WEB_ROOT }}
remote-baseurl: 'https://robostar.cs.york.ac.uk'
remote-relative-path: 'robotool/textual/'
maven-target: 'circus.robocalc.robochart.textual.repository/target/repository/'
- if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/comp') && github.event_name == 'push'
name: Create commit comment
uses: peter-evans/commit-comment@v1
with:
body: 'Successfully deployed at: https://robostar.cs.york.ac.uk/robotool/textual/${{ steps.deploy.outputs.dest }}'
# For commits to master other than pull requests, send RoboTool email updates.
#- if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
# name: Send email update
# run: ./send_emails.sh
# env:
# MAILCHIMPKEY: ${{ secrets.MAILCHIMPKEY }}
# MAILCHIMPUSR: ${{ secrets.MAILCHIMPUSR }}
- if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/comp') && github.event_name == 'push'
name: Rebuild Assertions Plugins
run: |
# Propagate recompilation if global flag is active
if [[ -z ${ROBOSTAR_RECOMPILE_ALL} || ${ROBOSTAR_RECOMPILE_ALL} = false ]]; then
echo "Recompilation is disabled or not set."
else
curl -H "Authorization: token ${ROBOSTAR_GITHUB_ACTIONS_TOKEN}" \
-X POST \
-d '{"event_type":"rebuild"}' \
https://api.github.com/repos/UoY-RoboStar/robochart-assertions/dispatches
fi
env:
ROBOSTAR_RECOMPILE_ALL: ${{ secrets.ROBOSTAR_RECOMPILE_ALL }}
ROBOSTAR_GITHUB_ACTIONS_TOKEN: ${{ secrets.ROBOSTAR_GITHUB_ACTIONS_TOKEN }}