diff --git a/.github/workflows/sandbox_ubuntu.yml b/.github/workflows/sandbox_ubuntu.yml new file mode 100644 index 0000000..af50762 --- /dev/null +++ b/.github/workflows/sandbox_ubuntu.yml @@ -0,0 +1,33 @@ +--- +name: sandbox_ubuntu +"on": + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + maven-build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + java: [11, 13] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-jdk-${{ matrix.java }}-maven- + - name: Build it with Maven + run: mvn -B test + - name: Test it + run: ./run.sh 7 | python3 test.py diff --git a/.github/workflows/sandbox.yml b/.github/workflows/sandbox_windows.yml similarity index 92% rename from .github/workflows/sandbox.yml rename to .github/workflows/sandbox_windows.yml index 4667b6a..88de77a 100644 --- a/.github/workflows/sandbox.yml +++ b/.github/workflows/sandbox_windows.yml @@ -1,5 +1,5 @@ --- -name: sandbox +name: sandbox_windows "on": push: branches: @@ -7,12 +7,13 @@ name: sandbox pull_request: branches: - master + jobs: maven-build: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest] + os: [windows-latest] java: [11, 13] steps: - uses: actions/checkout@v2 diff --git a/test.py b/test.py new file mode 100644 index 0000000..3736ab7 --- /dev/null +++ b/test.py @@ -0,0 +1,3 @@ +test_str = input() +print(f"The output is:\n{test_str}") +assert test_str == "7th Fibonacci number is 13"