From af0dee61f8e6577cd4a111991aa8d97ca6291c49 Mon Sep 17 00:00:00 2001 From: wtclarke Date: Tue, 31 Oct 2023 13:58:56 +0000 Subject: [PATCH 1/2] Enable github ci workflow --- .github/requirements.yml | 3 +++ .github/workflows/push_pr.yml | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/requirements.yml create mode 100644 .github/workflows/push_pr.yml diff --git a/.github/requirements.yml b/.github/requirements.yml new file mode 100644 index 00000000..27138433 --- /dev/null +++ b/.github/requirements.yml @@ -0,0 +1,3 @@ +dependencies: + - flake8 + - pytest \ No newline at end of file diff --git a/.github/workflows/push_pr.yml b/.github/workflows/push_pr.yml new file mode 100644 index 00000000..ab77761b --- /dev/null +++ b/.github/workflows/push_pr.yml @@ -0,0 +1,42 @@ +name: Run code tests on push and pull requests +on: + push: + pull_request: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + tests: + name: Code tests (Python ${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-latest"] + python-version: ["3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + lfs: true + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + activate-environment: test + environment-file: .github/requirements.yml + auto-activate-base: false + channels: conda-forge + - shell: bash -l {0} + run: | + conda info + conda list + - name: Lint + shell: bash -l {0} + run: | + python -m flake8 pypulseq + - name: Run pytest + shell: bash -l {0} + run: | + pip install . + pytest pypulseq/tests From 1acb949ccf7adcdbc848335b32e432a502b11736 Mon Sep 17 00:00:00 2001 From: wtclarke Date: Tue, 31 Oct 2023 14:03:56 +0000 Subject: [PATCH 2/2] Disable lint step for now --- .github/workflows/push_pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push_pr.yml b/.github/workflows/push_pr.yml index ab77761b..aa559d7b 100644 --- a/.github/workflows/push_pr.yml +++ b/.github/workflows/push_pr.yml @@ -31,10 +31,10 @@ jobs: run: | conda info conda list - - name: Lint - shell: bash -l {0} - run: | - python -m flake8 pypulseq + # - name: Lint + # shell: bash -l {0} + # run: | + # python -m flake8 pypulseq - name: Run pytest shell: bash -l {0} run: |