Skip to content

Run unit tests

Run unit tests #133

Workflow file for this run

# The workflow name
name: Run unit tests
on:
push:
paths:
- '**.lua'
pull_request:
paths:
- '**.lua'
workflow_dispatch:
# The list of jobs this workflow executes
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v3
# we need some base classes from the Courseplay repo
- name: Checkout Courseplay repository
uses: actions/checkout@v3
with:
repository: Courseplay/Courseplay_FS22
path: FS22_Courseplay
ref: main
- name: Lua Setup
uses: leafo/gh-actions-lua@v10
with:
# because atan2 is deprecated in 5.3
luaVersion: "5.2.4"
- name: Run unit tests
run: |
cd FS22_Courseplay/scripts/courseGenerator/test
lua BlockSequencerTest.lua
lua CacheMapTest.lua
lua FieldTest.lua
lua FieldworkCourseTest.lua
lua FieldworkCourseMultiVehicleTest.lua
lua HeadlandConnectorTest.lua
lua LineSegmentTest.lua
lua PolygonTest.lua
lua PolylineTest.lua
lua SliderTest.lua
lua RowPatternTest.lua
lua RowTest.lua
lua SliderTest.lua
lua TransformTest.lua
lua VertexTest.lua
lua WrapAroundIndexTest.lua