Skip to content

Merge branch 'develop' into master for release v0.0.5 #106

Merge branch 'develop' into master for release v0.0.5

Merge branch 'develop' into master for release v0.0.5 #106

Workflow file for this run

# @Github: https://github.com/Certseeds/CS203_DSAA_template_java
# @Organization: SUSTech
# @Author: nanoseeds
# @Date: 2020-07-28 22:43:03
# @LastEditors: nanoseeds
#@LastEditTime: 2020-07-28 23:43:03
# This is a basic workflow to help you get started with Actions
name: test for release
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [ push,pull_request ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
name: run maven test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-latest ,windows-latest ]
steps:
- name: checkout code
uses: actions/checkout@v3
# The Java version to make available on the path. Takes a whole or semver Java version,
# or 1.x syntax (e.g. 1.8 => Java 8.x).
# Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Use java and javac
run: javac -version; java -version
- name: windows clean build test
if: ${{ runner.os == 'windows' }}
run: ./mvnw.cmd clean compile test
- name: unix-like clean build test
if: ${{ runner.os != 'windows' }}
run: chmod +x ./mvnw.sh && ./mvnw.sh clean compile test
# This workflow contains a single job called "build"
build:
name: run script and build zip
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: test
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout code
uses: actions/checkout@v3
# ensure the path and files of project
- name: ensure the path and files of project
run: sudo apt install tree; tree
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
# The Java version to make available on the path. Takes a whole or semver Java version,
#or 1.x syntax (e.g. 1.8 => Java 8.x).
# Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28
java-version: 11
distribution: 'temurin'
cache: 'maven'
# - name: run script
# working-directory: ./script
# run: javac ./file_producer.java; java file_producer
- name: zip the packet
working-directory: ./../
run: |
zip -r script_no_need.zip ./CS203_DSAA_template_java -x "*/.git/*"
mv ./script_no_need.zip ./CS203_DSAA_template_java/script_no_need.zip
- name: unzip the packet
run: |
unzip ./script_no_need.zip
mkdir temp
mv ./CS203_DSAA_template_java ./temp/CS203_DSAA_template_java
mv ./temp ./CS203_DSAA_template_java
- uses: actions/upload-artifact@v3
with:
name: script_no_need
path: CS203_DSAA_template_java
# Runs a set of commands using the runners shell
- name: tree
run: tree