Skip to content

Commit 1ac037e

Browse files
committed
fixup
1 parent 00f5780 commit 1ac037e

File tree

1 file changed

+46
-20
lines changed

1 file changed

+46
-20
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@ jobs:
3535
with:
3636
version: "${{ matrix.NXF_VER }}"
3737

38+
- name: Hash Github Workspace
39+
id: hash_workspace
40+
run: |
41+
echo "digest=$(echo RNA_3.10.1_${{ github.workspace }} | md5sum | cut -c 1-25)" >> $GITHUB_OUTPUT
42+
3843
- name: Cache test data
3944
id: cache-testdata
4045
uses: actions/cache@v3
4146
with:
4247
path: test-datasets/
43-
key: rnaseq3_10-test-data
48+
key: ${{ steps.hash_workspace.outputs.digest }}
4449

4550
- name: Check out test data
4651
if: steps.cache-testdata.outputs.cache-hit != 'true'
@@ -52,16 +57,16 @@ jobs:
5257

5358
- name: Replace remote paths in samplesheets
5459
run: |
55-
for f in ./test-datasets/samplesheet/v3.10/*.csv; do
56-
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=./test-datasets/=g" $f
60+
for f in ${{ github.workspace }}/test-datasets/samplesheet/v3.10/*.csv; do
61+
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=${{ github.workspace }}/test-datasets/=g" $f
5762
echo "========== $f ============"
5863
cat $f
5964
echo "========================================"
6065
done;
6166
6267
- name: Run pipeline with test data
6368
run: |
64-
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results --test_data_base ./test-datasets/
69+
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results --test_data_base ${{ github.workspace }}/test-datasets/
6570
6671
star_salmon:
6772
name: Test STAR Salmon with workflow parameters
@@ -87,12 +92,17 @@ jobs:
8792
- name: Check out pipeline code
8893
uses: actions/checkout@v2
8994

95+
- name: Hash Github Workspace
96+
id: hash_workspace
97+
run: |
98+
echo "digest=$(echo RNA_3.10.1_${{ github.workspace }} | md5sum | cut -c 1-25)" >> $GITHUB_OUTPUT
99+
90100
- name: Cache test data
91101
id: cache-testdata
92102
uses: actions/cache@v3
93103
with:
94104
path: test-datasets/
95-
key: rnaseq3_10-test-data
105+
key: ${{ steps.hash_workspace.outputs.digest }}
96106

97107
- name: Check out test data
98108
if: steps.cache-testdata.outputs.cache-hit != 'true'
@@ -104,8 +114,8 @@ jobs:
104114

105115
- name: Replace remote paths in samplesheets
106116
run: |
107-
for f in ./test-datasets/samplesheet/v3.10/*.csv; do
108-
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=./test-datasets/=g" $f
117+
for f in ${{ github.workspace }}/test-datasets/samplesheet/v3.10/*.csv; do
118+
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=${{ github.workspace }}/test-datasets/=g" $f
109119
echo "========== $f ============"
110120
cat $f
111121
echo "========================================"
@@ -118,7 +128,7 @@ jobs:
118128
119129
- name: Run pipeline with STAR and various parameters
120130
run: |
121-
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner star_salmon ${{ matrix.parameters }} --outdir ./results --test_data_base ./test-datasets/
131+
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner star_salmon ${{ matrix.parameters }} --outdir ./results --test_data_base ${{ github.workspace }}/test-datasets/
122132
123133
star_rsem:
124134
name: Test STAR RSEM with workflow parameters
@@ -133,12 +143,17 @@ jobs:
133143
- name: Check out pipeline code
134144
uses: actions/checkout@v2
135145

146+
- name: Hash Github Workspace
147+
id: hash_workspace
148+
run: |
149+
echo "digest=$(echo RNA_3.10.1_${{ github.workspace }} | md5sum | cut -c 1-25)" >> $GITHUB_OUTPUT
150+
136151
- name: Cache test data
137152
id: cache-testdata
138153
uses: actions/cache@v3
139154
with:
140155
path: test-datasets/
141-
key: rnaseq3_10-test-data
156+
key: rnaseq-${{ steps.hash_workspace.outputs.digest }}
142157

143158
- name: Check out test data
144159
if: steps.cache-testdata.outputs.cache-hit != 'true'
@@ -150,8 +165,8 @@ jobs:
150165

151166
- name: Replace remote paths in samplesheets
152167
run: |
153-
for f in ./test-datasets/samplesheet/v3.10/*.csv; do
154-
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=./test-datasets/=g" $f
168+
for f in ${{ github.workspace }}/test-datasets/samplesheet/v3.10/*.csv; do
169+
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=${{ github.workspace }}/test-datasets/=g" $f
155170
echo "========== $f ============"
156171
cat $f
157172
echo "========================================"
@@ -164,7 +179,7 @@ jobs:
164179
165180
- name: Run pipeline with RSEM STAR and various parameters
166181
run: |
167-
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner star_rsem ${{ matrix.parameters }} --outdir ./results --test_data_base ./test-datasets/
182+
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner star_rsem ${{ matrix.parameters }} --outdir ./results --test_data_base ${{ github.workspace }}/test-datasets/
168183
169184
hisat2:
170185
name: Test HISAT2 with workflow parameters
@@ -179,12 +194,17 @@ jobs:
179194
- name: Check out pipeline code
180195
uses: actions/checkout@v2
181196

197+
- name: Hash Github Workspace
198+
id: hash_workspace
199+
run: |
200+
echo "digest=$(echo RNA_3.10.1_${{ github.workspace }} | md5sum | cut -c 1-25)" >> $GITHUB_OUTPUT
201+
182202
- name: Cache test data
183203
id: cache-testdata
184204
uses: actions/cache@v3
185205
with:
186206
path: test-datasets/
187-
key: rnaseq3_10-test-data
207+
key: rnaseq-${{ steps.hash_workspace.outputs.digest }}
188208

189209
- name: Check out test data
190210
if: steps.cache-testdata.outputs.cache-hit != 'true'
@@ -196,8 +216,8 @@ jobs:
196216

197217
- name: Replace remote paths in samplesheets
198218
run: |
199-
for f in ./test-datasets/samplesheet/v3.10/*.csv; do
200-
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=./test-datasets/=g" $f
219+
for f in ${{ github.workspace }}/test-datasets/samplesheet/v3.10/*.csv; do
220+
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=${{ github.workspace }}/test-datasets/=g" $f
201221
echo "========== $f ============"
202222
cat $f
203223
echo "========================================"
@@ -210,7 +230,7 @@ jobs:
210230
211231
- name: Run pipeline with HISAT2 and various parameters
212232
run: |
213-
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner hisat2 ${{ matrix.parameters }} --outdir ./results --test_data_base ./test-datasets/
233+
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --aligner hisat2 ${{ matrix.parameters }} --outdir ./results --test_data_base ${{ github.workspace }}/test-datasets/
214234
215235
salmon:
216236
name: Test Salmon with workflow parameters
@@ -225,12 +245,18 @@ jobs:
225245
- name: Check out pipeline code
226246
uses: actions/checkout@v2
227247

248+
- name: Hash Github Workspace
249+
id: hash_workspace
250+
run: |
251+
echo "digest=$(echo RNA_3.10.1_${{ github.workspace }} | md5sum | cut -c 1-25)" >> $GITHUB_OUTPUT
252+
253+
228254
- name: Cache test data
229255
id: cache-testdata
230256
uses: actions/cache@v3
231257
with:
232258
path: test-datasets/
233-
key: rnaseq3_10-test-data
259+
key: ${{ steps.hash_workspace.outputs.digest }}
234260

235261
- name: Check out test data
236262
if: steps.cache-testdata.outputs.cache-hit != 'true'
@@ -242,8 +268,8 @@ jobs:
242268

243269
- name: Replace remote paths in samplesheets
244270
run: |
245-
for f in ./test-datasets/samplesheet/v3.10/*.csv; do
246-
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=./test-datasets/=g" $f
271+
for f in ${{ github.workspace }}/test-datasets/samplesheet/v3.10/*.csv; do
272+
sed -i "s=https://raw.githubusercontent.com/nf-core/test-datasets/rnaseq/=${{ github.workspace }}/test-datasets/=g" $f
247273
echo "========== $f ============"
248274
cat $f
249275
echo "========================================"
@@ -256,4 +282,4 @@ jobs:
256282
257283
- name: Run pipeline with Salmon and various parameters
258284
run: |
259-
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --pseudo_aligner salmon ${{ matrix.parameters }} --outdir ./results --test_data_base ./test-datasets/
285+
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --pseudo_aligner salmon ${{ matrix.parameters }} --outdir ./results --test_data_base ${{ github.workspace }}/test-datasets/

0 commit comments

Comments
 (0)