1
+ name : Pipeline
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+
8
+ jobs :
9
+ black :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ - uses : psf/black@stable
14
+ with :
15
+ options : " --check --diff"
16
+ src : ./${{ github.event.repository.name }}
17
+
18
+ black_fix : # in most cases pre-commit is faster
19
+ needs : [black]
20
+ if : failure()
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+ with :
25
+ token : ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }}
26
+ ref : ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR
27
+ fetch-depth : 0 # otherwise, you will fail to push refs to dest repo
28
+ - name : format black
29
+ uses : psf/black@stable
30
+ with :
31
+ options : " "
32
+ src : " ./${{ github.event.repository.name }}"
33
+ - name : commit
34
+ run : |
35
+ git config --local user.email "[email protected] "
36
+ git config --local user.name "pyiron-runner"
37
+ git commit -m "Format black" -a
38
+ - name : push
39
+ uses : ad-m/github-push-action@master
40
+ with :
41
+ github_token : ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }}
42
+ branch : ${{ github.event.pull_request.head.ref }}
43
+
44
+ minimal :
45
+ needs : [black]
46
+ runs-on : ubuntu-latest
47
+ steps :
48
+ - uses : actions/checkout@v4
49
+ - name : Conda config
50
+ shell : bash -l {0}
51
+ run : echo -e "channels:\n - conda-forge\n" > .condarc
52
+ - name : Setup Mambaforge
53
+ uses : conda-incubator/setup-miniconda@v3
54
+ with :
55
+ python-version : " 3.12"
56
+ miniforge-version : latest
57
+ condarc-file : .condarc
58
+ environment-file : .ci_support/environment-mini.yml
59
+ - name : Test
60
+ shell : bash -l {0}
61
+ timeout-minutes : 5
62
+ run : |
63
+ pip install versioneer[toml]==0.29
64
+ pip install . --no-deps --no-build-isolation
65
+ python -m unittest discover tests
66
+
67
+ pyiron_atomistics_tests_0_6_20 :
68
+ needs : [black]
69
+ runs-on : ubuntu-latest
70
+ steps :
71
+ - uses : actions/checkout@v4
72
+ - name : Conda config
73
+ shell : bash -l {0}
74
+ run : echo -e "channels:\n - conda-forge\n" > .condarc
75
+ - name : Setup Mambaforge
76
+ uses : conda-incubator/setup-miniconda@v3
77
+ with :
78
+ python-version : " 3.12"
79
+ miniforge-version : latest
80
+ condarc-file : .condarc
81
+ environment-file : .ci_support/environment-pyiron-atomistics-0-6-20.yml
82
+ - name : Test
83
+ shell : bash -l {0}
84
+ timeout-minutes : 5
85
+ run : |
86
+ pip install versioneer[toml]==0.29
87
+ pip install . --no-deps --no-build-isolation
88
+ python -m unittest discover tests
89
+
90
+ pyiron_atomistics_tests_0_6_21 :
91
+ needs : [black]
92
+ runs-on : ubuntu-latest
93
+ steps :
94
+ - uses : actions/checkout@v4
95
+ - name : Conda config
96
+ shell : bash -l {0}
97
+ run : echo -e "channels:\n - conda-forge\n" > .condarc
98
+ - name : Setup Mambaforge
99
+ uses : conda-incubator/setup-miniconda@v3
100
+ with :
101
+ python-version : " 3.12"
102
+ miniforge-version : latest
103
+ condarc-file : .condarc
104
+ environment-file : .ci_support/environment-pyiron-atomistics-0-6-21.yml
105
+ - name : Test
106
+ shell : bash -l {0}
107
+ timeout-minutes : 5
108
+ run : |
109
+ pip install versioneer[toml]==0.29
110
+ pip install . --no-deps --no-build-isolation
111
+ python -m unittest discover tests
112
+
113
+
114
+ pyiron_atomistics_tests_0_6_22 :
115
+ needs : [black]
116
+ runs-on : ubuntu-latest
117
+ steps :
118
+ - uses : actions/checkout@v4
119
+ - name : Conda config
120
+ shell : bash -l {0}
121
+ run : echo -e "channels:\n - conda-forge\n" > .condarc
122
+ - name : Setup Mambaforge
123
+ uses : conda-incubator/setup-miniconda@v3
124
+ with :
125
+ python-version : " 3.12"
126
+ miniforge-version : latest
127
+ condarc-file : .condarc
128
+ environment-file : .ci_support/environment-pyiron-atomistics-0-6-22.yml
129
+ - name : Test
130
+ shell : bash -l {0}
131
+ timeout-minutes : 5
132
+ run : |
133
+ pip install versioneer[toml]==0.29
134
+ pip install . --no-deps --no-build-isolation
135
+ python -m unittest discover tests
136
+
137
+ pyiron_atomistics_tests_0_6_23 :
138
+ needs : [black]
139
+ runs-on : ubuntu-latest
140
+ steps :
141
+ - uses : actions/checkout@v4
142
+ - name : Conda config
143
+ shell : bash -l {0}
144
+ run : echo -e "channels:\n - conda-forge\n" > .condarc
145
+ - name : Setup Mambaforge
146
+ uses : conda-incubator/setup-miniconda@v3
147
+ with :
148
+ python-version : " 3.12"
149
+ miniforge-version : latest
150
+ condarc-file : .condarc
151
+ environment-file : .ci_support/environment-pyiron-atomistics-0-6-23.yml
152
+ - name : Test
153
+ shell : bash -l {0}
154
+ timeout-minutes : 5
155
+ run : |
156
+ pip install versioneer[toml]==0.29
157
+ pip install . --no-deps --no-build-isolation
158
+ python -m unittest discover tests
159
+
160
+ autobot :
161
+ needs : [minimal, pyiron_atomistics_tests_0_6_23, pyiron_atomistics_tests_0_6_22, pyiron_atomistics_tests_0_6_21, pyiron_atomistics_tests_0_6_20]
162
+ permissions :
163
+ contents : write
164
+ pull-requests : write
165
+ runs-on : ubuntu-latest
166
+ if : (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]')
167
+ steps :
168
+ - name : Enable auto-merge for bot PRs
169
+ run : gh pr merge --auto --squash "$PR_URL"
170
+ env :
171
+ PR_URL : ${{github.event.pull_request.html_url}}
172
+ GH_TOKEN : ${{secrets.GITHUB_TOKEN}}
0 commit comments