generated from MLH-Fellowship/pe-portfolio-site
-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·51 lines (44 loc) · 1.37 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: run-tests
env:
TESTING: true
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12.4"
- name: Setup Python Virtual Environment
run: python -m venv python3-virtualenv
- name: Install Dependencies
run: python3-virtualenv/bin/pip install -r requirements.txt
- name: Run Tests
run: ./run_test.sh
deploy-trigger:
runs-on: ubuntu-latest
needs: run-tests
steps:
- name: Trigger Deploy Workflow
uses: actions/github-script@v6
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "deploy.yml",
ref: context.ref,
inputs: {
tests_failed: ${{ job.status == 'failure' }}
}
})