Skip to content

Commit

Permalink
增加自动测试action.
Browse files Browse the repository at this point in the history
  • Loading branch information
Certseeds committed Jul 26, 2020
1 parent dd0baf5 commit 3bfe238
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 0.0.6.3
release_name: 0.0.6.3
tag_name: 0.0.6.4
release_name: 0.0.6.4
draft: false
prerelease: false

Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# @Github: https://github.com/Certseeds/CS203_DSAA_template
# @Organization: SUSTech
# @Author: nanoseeds
# @Date: 2020-07-26 19:08:22
# @LastEditors: nanoseeds
# @LastEditTime: 2020-07-26 19:08:34

name: test

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# 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:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout code
uses: actions/checkout@v2

# ensure the path and files of project
- name: ensure the path and files of project
run: |
echo Hello, world!
echo $(pwd)
ls -la
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.10.2'

- name: Use cmake
run: cmake --version

- name: mkdir for build
run: mkdir ./cmake_build

- name: build the project
working-directory: ./cmake_build
run: |
cmake ..
make
- name: run the test
working-directory: ./cmake_build
run: ./CS203_DSAA_template_test

- name: Run a multi-line script
run: |
echo $(pwd)
ls -la

0 comments on commit 3bfe238

Please sign in to comment.