Update parser.py #6
Workflow file for this run
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
name: LocalTests | |
on: | |
pull_request_target: | |
types: [assigned, opened, synchronize, reopened, ready_for_review] | |
push: | |
branches: | |
- main | |
- future | |
# Jobs section | |
jobs: | |
LocalTests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
runs-on: ${{ matrix.os }} | |
if: github.event.pull_request.draft == false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Running Local Tests | |
run: | | |
## Install pytest | |
pip install pytest | |
pytest | |
# TODO: Ideally make a PR comment too but there is no need to for now | |
# # fetch the execution results of the passed/failed | |
# cd workflow && bash parse.sh > results.log 2>&1 | |
# # get the timer | |
# timer=$(LANG=en_us_88591; date) | |
# echo "VERSION<<EOF" >> $GITHUB_ENV | |
# echo "OS:${{matrix.os}}" >> $GITHUB_ENV | |
# echo "$timer" >> $GITHUB_ENV | |
# # Parse the results and construct a github message post | |
# # we append the data to the global env | |
# cat results.log >> $GITHUB_ENV | |
# echo 'EOF' >> $GITHUB_ENV | |
# - name: Comment on PR | |
# uses: actions/github-script@v3 | |
# with: | |
# script: | | |
# let body = `${{ env.VERSION }}` | |
# console.log(context) | |
# // if we are directly pushing on main/future, we cannot push comments -> exit | |
# if (context.eventName === "push" && (context.ref === "refs/heads/main" || context.ref === "refs/heads/future")) { | |
# return 0; | |
# } | |
# github.issues.createComment({ | |
# issue_number: context.issue.number, | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# body: body, | |
# }) | |
# - name: Exit Code | |
# run: | | |
# # check if everything executed without errors | |
# cd ../pash/scripts/workflow && bash exit_code.sh | |