Skip to content

Commit

Permalink
Merge branch 'feat/workflows-cache-6s-source' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
brianschubert committed Sep 9, 2023
2 parents 557c9c2 + ad455ff commit eaaa988
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,34 @@ name: Tests
on: [ push ]

jobs:
download_archives:
uses: ./.github/workflows/web_artifact.yaml
with:
name: 6s-archives
urls: |
[
"https://web.archive.org/web/20220912090811if_/https://rtwilson.com/downloads/6SV-1.1.tar",
"https://web.archive.org/web/20220909154857if_/https://salsa.umd.edu/files/6S/6sV2.1.tar"
]
retention-days: 1
test:
needs: download_archives
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ "windows-latest", "ubuntu-latest", "macos-latest" ]
python-version: [ "3.9","3.10", "3.11" ]
python-version: [ "3.9", "3.10", "3.11" ]
steps:
- uses: actions/checkout@v3

- name: Retrieve 6S source archives
uses: actions/download-artifact@v3
with:
name: 6s-archives
path: 6s-archives

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -26,6 +43,8 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install '.[wrapper]' pytest
env:
SIXS_ARCHIVE_DIR: 6s-archives

- name: Run pytest
run: python -m pytest -vv
33 changes: 33 additions & 0 deletions .github/workflows/web_artifact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Web artifacts

on:
workflow_call:
inputs:
name:
required: true
type: string
description: Artifact name. See 'actions/upload-artifact'.
urls:
required: true
type: string
description: JSON string encoding a list of download URLs.
retention-days:
type: number
default: 0
description: Artifact retention. See 'actions/upload-artifact'.

jobs:
download:
runs-on: ubuntu-latest
strategy:
matrix:
url: ${{ fromJSON(inputs.urls) }}
steps:
- name: Download file
run:
curl --create-dirs --output-dir artifacts -O ${{ matrix.url }}
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.name }}
path: artifacts
retention-days: ${{ inputs.retention-days }}

0 comments on commit eaaa988

Please sign in to comment.