Add exercise test GHA #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of the dependencies and run tests across different versions | |
# | |
# Replace <track> with the track name | |
# Replace <image-name> with an image to run the jobs on | |
# Replace <action to setup tooling> with a github action to setup tooling on the image | |
# Replace <install dependencies> with a cli command to install the dependencies | |
# | |
# Find Github Actions to setup tooling here: | |
# - https://github.com/actions/?q=setup&type=&language= | |
# - https://github.com/actions/starter-workflows/tree/main/ci | |
# - https://github.com/marketplace?type=actions&query=setup | |
# | |
# Requires scripts: | |
# - bin/test | |
name: Test Exercises | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '8' | |
- name: Cache CommandBox | |
uses: actions/cache@v2 | |
with: | |
path: | | |
$HOME/.CommandBox | |
key: commandbox-${{ runner.os }}-${{ hashFiles('**/*.box') }} | |
- name: Install CommandBox | |
run: | | |
sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622 | |
sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a /etc/apt/sources.list.d/commandbox.list | |
sudo apt-get update && sudo apt-get --assume-yes install commandbox | |
- name: Run Tests | |
run: | | |
bin/fetch-configlet | |
bin/configlet lint . | |
box task run tasks/TestAllSolutions |