generated from pyiron/pyiron_module_template
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (47 loc) · 1.76 KB
/
test-latest-release.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
# This tests the latest conda-forge release rather than the local code
# When included in a cron job, it will flag maintainers if the conda installation malfunctions
# (e.g. because of a problem with dependencies)
name: Test Conda Release
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1'
jobs:
test-conda-release:
runs-on: ubuntu-latest
steps:
- name: Get latest release tag
id: get-release
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const response = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
});
console.log(response.data.tag_name);
return response.data.tag_name
- name: Checkout release
uses: actions/checkout@v4
with:
ref: ${{ steps.get-release.outputs.result }}
- name: Create env from repo name
shell: bash -l {0}
run: |
echo -e "channels:\n- conda-forge\ndependencies:\n- ${{ github.event.repository.name }}" > ./just_this_package_environment.yml
cat ./just_this_package_environment.yml
echo `pwd`
- uses: pyiron/actions/[email protected]
with:
python-version: '3.12'
env-files: ./just_this_package_environment.yml
local-code-directory: ''
- uses: pyiron/actions/[email protected]
- uses: pyiron/actions/[email protected]
with: # This is specific to getting the executorlib tests to work
path-dirs: tests tests/benchmark tests/integration tests/static tests/unit
- name: Test
shell: bash -l {0}
run: |
python -m unittest discover tests/unit