Skip to content

Commit

Permalink
run tests on tag pushes too
Browse files Browse the repository at this point in the history
  • Loading branch information
karasikov authored Jan 10, 2022
1 parent 16ede6b commit fe6582a
Showing 1 changed file with 39 additions and 40 deletions.
79 changes: 39 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ env:
jobs:

Linux:
if: "!startsWith(github.ref, 'refs/tags/v')"
runs-on: ubuntu-18.04

strategy:
Expand Down Expand Up @@ -137,7 +136,6 @@ jobs:


MacOS:
if: "!startsWith(github.ref, 'refs/tags/v')"
runs-on: macos-latest

strategy:
Expand Down Expand Up @@ -186,10 +184,47 @@ jobs:
- name: run integration tests
run: cd metagraph/build && make check


Metagraph-Workflows:
name: Test metagraph workflows
runs-on: ubuntu-20.04
needs: [Linux]

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: fetch static binary
uses: actions/download-artifact@v2
with:
path: artifacts

- name: setup metagraph binary
run: |
sudo ln -s $(pwd)/artifacts/metagraph_DNA_linux_x86/metagraph_DNA /usr/local/bin/metagraph
sudo chmod +rx /usr/local/bin/metagraph
/usr/local/bin/metagraph --help
metagraph --help
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r metagraph/workflows/requirements.txt
- name: Test metagraph-workflows pytest
run: |
cd metagraph/workflows
pytest
Build-and-Push-Docker:
# adapted from https://docs.github.com/en/actions/guides/publishing-docker-images#publishing-images-to-github-packages
if: github.event_name != 'pull_request'
needs: [Linux]
needs: [Linux, Metagraph-Workflows]
runs-on: ubuntu-20.04
permissions:
contents: read
Expand Down Expand Up @@ -224,47 +259,11 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}


Metagraph-Workflows:
name: Test metagraph workflows
if: "!startsWith(github.ref, 'refs/tags/v')"
runs-on: ubuntu-20.04
needs: [Linux]

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: fetch static binary
uses: actions/download-artifact@v2
with:
path: artifacts

- name: setup metagraph binary
run: |
sudo ln -s $(pwd)/artifacts/metagraph_DNA_linux_x86/metagraph_DNA /usr/local/bin/metagraph
sudo chmod +rx /usr/local/bin/metagraph
/usr/local/bin/metagraph --help
metagraph --help
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r metagraph/workflows/requirements.txt
- name: Test metagraph-workflows pytest
run: |
cd metagraph/workflows
pytest
Release:
name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: [Linux]
needs: [Linux, Metagraph-Workflows]
steps:
- uses: actions/checkout@v1

Expand Down

0 comments on commit fe6582a

Please sign in to comment.