Merge pull request #34 from userma000913/main #89
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
# Example: https://docs.github.com/cn/actions/quickstart | |
# Document: https://docs.github.com/cn/enterprise-server@3.1/actions/using-workflows/workflow-syntax-for-github-actions | |
# https://docs.github.com/cn/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | |
# https://github.community/t/use-working-directory-for-entire-job/16747/2 | |
# https://stackoverflow.com/questions/58139175/running-actions-in-another-directory | |
# https://stackoverflow.com/questions/58139175/running-actions-in-another-directory/63122434#63122434 | |
name: build | |
on: | |
push: | |
branches: | |
- main | |
- testing | |
jobs: | |
start: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: .github/workflows/deploy | |
steps: | |
# The directory is /home/runner/work/golib/golib, you must use the fuck field: uses | |
# https://stackoverflow.com/questions/72002229/github-actions-checkoutv3-where-is-repo-downloaded | |
- uses: actions/checkout@v1 | |
- run: echo $(pwd) | |
- run: bash start.sh ../../../ | |
working-directory: ${{env.working-directory}} | |
# code_check: | |
# runs-on: ubuntu-latest | |
# env: | |
# working-directory: .github/workflows/deploy | |
# steps: | |
# - uses: actions/checkout@v1 | |
# - run: bash code_check.sh ../../../ | |
# working-directory: ${{env.working-directory}} | |
unit_test: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: .github/workflows/deploy | |
steps: | |
- uses: actions/checkout@v1 | |
- run: bash unit_test.sh ../../../ | |
working-directory: ${{env.working-directory}} | |
stop: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: .github/workflows/deploy | |
steps: | |
- uses: actions/checkout@v1 | |
- run: bash stop.sh ../../../ | |
working-directory: ${{env.working-directory}} |