Skip to content

Commit 92cde9d

Browse files
committed
finally a windows wf that works
1 parent 6a60fc2 commit 92cde9d

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
s3_secret_key:
2323
required: false
2424
jobs:
25-
deploy_in_container:
25+
deploy_on_linux:
2626
runs-on: ubuntu-latest
2727
container:
2828
image: ghcr.io/courtois-neuromod/dataset-tests:main
@@ -43,3 +43,33 @@ jobs:
4343
- name: "Test deploy"
4444
run: |
4545
pytest --log-cli-level=WARNING /actions/tests
46+
47+
deploy_on_windows:
48+
runs-on: windows-latest
49+
needs: deploy_on_linux # only run if tests pass on linux
50+
env:
51+
GIT_USERNAME: ${{ inputs.name }}
52+
GIT_EMAIL: ${{ inputs.email }}
53+
AWS_ACCESS_KEY_ID: ${{ secrets.s3_access_key }}
54+
AWS_SECRET_ACCESS_KEY: ${{ secrets.s3_secret_key }}
55+
GIT_TOKEN: ${{ secrets.git_token }}
56+
steps:
57+
- name: setup python
58+
uses: actions/[email protected]
59+
with:
60+
python-version: 3.11
61+
- name: setup datalad
62+
run: |
63+
python -m pip install datalad-installer
64+
datalad-installer git-annex -m datalad/git-annex:release
65+
git config --global filter.annex.process "git-annex filter-process"
66+
python -m pip install datalad pytest pytest-order ssh_agent_setup
67+
- name: "Test deploy"
68+
shell: bash
69+
run: |
70+
mkdir -p $HOME/.ssh
71+
ssh-keyscan -H -t rsa ${GITHUB_SERVER_URL##https://} >> $HOME/.ssh/known_hosts
72+
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
73+
git config --global datalad.ssh.identityfile ~/.ssh/id_rsa
74+
git clone https://github.com/courtois-neuromod/actions-datasets.git /tmp/actions
75+
pytest -v --full-trace --log-cli-level=WARNING /tmp/actions/tests/deploy

0 commit comments

Comments
 (0)