-
Notifications
You must be signed in to change notification settings - Fork 57
47 lines (45 loc) · 1.53 KB
/
test-bohrium.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
name: Test Bohrium
on:
push:
pull_request_target:
types:
- "labeled"
jobs:
test:
runs-on: ubuntu-latest
environment: bohrium
if: github.repository_owner == 'deepmodeling' && (github.event.label.name == 'Test Bohrium' || github.event_name == 'push')
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install uv
- run: uv pip install --system .[bohrium] coverage
- name: Test
run: coverage run --source=./dpdispatcher -m unittest -v tests/test_run_submission_bohrium.py && coverage report
env:
DPDISPATCHER_TEST: bohrium
BOHRIUM_EMAIL: ${{ secrets.BOHRIUM_EMAIL }}
BOHRIUM_PASSWORD: ${{ secrets.BOHRIUM_PASSWORD }}
BOHRIUM_PROJECT_ID: ${{ secrets.BOHRIUM_PROJECT_ID }}
BOHRIUM_ACCESS_KEY: ${{ secrets.BOHRIUM_ACCESS_KEY }}
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
remove_label:
permissions:
contents: read
pull-requests: write
# so one can re-trigger the workflow without manually removing the label
runs-on: ubuntu-latest
if: github.repository_owner == 'deepmodeling' && github.event.label.name == 'Test Bohrium'
steps:
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: Test Bohrium
number: ${{ github.event.pull_request.number }}