@@ -108,14 +108,15 @@ jobs:
108108 continue-on-error : true
109109 run : |
110110 if [ ! -f ${{ github.workspace }}/.github/__snapshots__/${{ matrix.TEMPLATE }}.nf.test.snap ]; then
111- echo "generatesnapshot=YES" >> $GITHUB_ENV
111+ echo "Generate a snapshot when creating a pipeline and skipping the feature ${{ matrix.TEMPLATE }}."
112+ echo "Then, copy it to the directory .github/__snapshots__"
112113 else
113114 cp ${{ github.workspace }}/.github/__snapshots__/${{ matrix.TEMPLATE }}.nf.test.snap create-test-lint-wf/my-prefix-testpipeline/tests/default.nf.test.snap
114115 fi
115116
116117 # Generate snapshot if not there
117118 - name : run pipeline nf-test and generate snapshot if previous step failed
118- if : ${{ env.generatesnapshot && matrix.TEMPLATE != 'all' && matrix.TEMPLATE != 'nf-test' }}
119+ if : ${{ matrix.TEMPLATE != 'all' && matrix.TEMPLATE != 'nf-test' }}
119120 shell : bash
120121 env :
121122 NFT_DIFF : " pdiff"
@@ -125,18 +126,7 @@ jobs:
125126 nf-test test \
126127 --profile=+docker \
127128 --verbose
128- cp tests/default.nf.test.snap ${{ github.workspace }}/.github/__snapshots__/${{ matrix.TEMPLATE }}.nf.test.snap
129-
130- - name : Commit and push changes
131- if : env.generatesnapshot == 'YES'
132- run : |
133- git config user.email "[email protected] " 134- git config user.name "nf-core-bot"
135- git config push.default upstream
136- git add ${{ github.workspace }}/.github/__snapshots__/${{ matrix.TEMPLATE }}.nf.test.snap
137- git status
138- git commit -m "Generate snapshot for ${{ matrix.TEMPLATE }} template"
139- git push origin HEAD:${{ github.head_ref }}
129+ cat tests/default.nf.test.snap
140130
141131 # Run pipeline with nf-test
142132 - name : run pipeline nf-test
0 commit comments