Skip to content

Commit 2a2ecf9

Browse files
authored
Merge pull request #23 from nsdf-fabric/ci/update-workflows
CI: test workflow and publish workflow update
2 parents e3c3b41 + 4184433 commit 2a2ecf9

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: Publish Services to GHCR
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
4+
workflow_run:
5+
workflows: [Test]
6+
types:
7+
- completed
108

119
jobs:
1210
build:
@@ -17,6 +15,7 @@ jobs:
1715
DASHBOARD_SERVICE_IMAGE_NAME: intersect-service
1816
STORAGE_SERVICE_IMAGE_NAME: intersect-storage
1917

18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2019
steps:
2120
- name: Checkout repository
2221
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Miniconda
19+
uses: conda-incubator/setup-miniconda@v2
20+
with:
21+
conda-version: "24.11.2"
22+
auto-activate-base: false
23+
24+
- name: Install dependencies
25+
run: |
26+
conda env create -f config/environment.yaml
27+
conda run --no-capture-output -n espd_mantid pip install pytest
28+
29+
- name: Run tests
30+
run: |
31+
conda run --no-capture-output -n espd_mantid python -m pytest

0 commit comments

Comments
 (0)