Skip to content

Commit

Permalink
Test the github action
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-schlipf committed Jun 21, 2023
1 parent dc80f57 commit b16aa99
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 92 deletions.
114 changes: 57 additions & 57 deletions .github/workflows/test_core.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
name: test-core

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "poetry!=1.4.1"
poetry --version
cd core
poetry install
- name: Test with pytest
run: |
poetry run pytest --version
test-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
- name: Install dependencies with conda
run: |
conda info
conda install -c conda-forge mdtraj
- name: Install py4vasp
run: |
python -m pip install --upgrade pip
cd core
pip install .
- name: Test with pytest
run: |
pip install pytest pytest-cov hypothesis
pytest --version
# name: test-core
#
# on:
# push:
# branches: [master]
# pull_request:
# branches: [master]
#
# jobs:
# tests:
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, macos-latest]
# python-version: ["3.8", "3.9", "3.10"]
#
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install "poetry!=1.4.1"
# poetry --version
# cd core
# poetry install
# - name: Test with pytest
# run: |
# poetry run pytest --version
#
#
# test-windows:
# runs-on: windows-latest
#
# steps:
# - uses: actions/checkout@v3
# - uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# python-version: 3.8
# - name: Install dependencies with conda
# run: |
# conda info
# conda install -c conda-forge mdtraj
# - name: Install py4vasp
# run: |
# python -m pip install --upgrade pip
# cd core
# pip install .
# - name: Test with pytest
# run: |
# pip install pytest pytest-cov hypothesis
# pytest --version
76 changes: 41 additions & 35 deletions .github/workflows/test_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest] #, macos-latest]
python-version: ["3.8"] #, "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,47 +30,53 @@ jobs:
poetry install
- name: Test with pytest
run: |
poetry run pytest --version
poetry run pytest --cov=py4vasp --cov-report term
- name: Check code style
run: |
poetry run isort --version
poetry run isort --check src
poetry run isort --check tests
poetry run black --version
poetry run black --check src
poetry run black --check tests
test-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
- name: Install dependencies with conda
run: |
conda info
conda install -c conda-forge mdtraj
- name: Install py4vasp
run: |
python -m pip install --upgrade pip
cd full
pip install .
- name: Test with pytest
run: |
pip install pytest pytest-cov hypothesis
poetry shell
cd ..
pytest --version
pytest --cov=py4vasp --cov-report term
- name: Check code style
run: |
pip install black isort
cd full
poetry shell
cd ..
isort --version
isort --check src
isort --check tests
black --version
black --check src
black --check tests
# test-windows:
# runs-on: windows-latest
#
# steps:
# - uses: actions/checkout@v3
# - uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# python-version: 3.8
# - name: Install dependencies with conda
# run: |
# conda info
# conda install -c conda-forge mdtraj
# - name: Install py4vasp
# run: |
# python -m pip install --upgrade pip
# cd full
# pip install .
# - name: Test with pytest
# run: |
# pip install pytest pytest-cov hypothesis
# pytest --version
# pytest --cov=py4vasp --cov-report term
# - name: Check code style
# run: |
# pip install black isort
# isort --version
# isort --check src
# isort --check tests
# black --version
# black --check src
# black --check tests

0 comments on commit b16aa99

Please sign in to comment.