From 508e993be135412b8fe352f55e719078e1ce7840 Mon Sep 17 00:00:00 2001 From: Mostafa Farrag Date: Tue, 27 Dec 2022 07:31:10 +0100 Subject: [PATCH] update ci files --- .github/workflows/automerge.yml | 18 ------- .github/workflows/clones_count.yml | 39 -------------- .../workflows/{workflow.yml => ubuntu.yml} | 51 ++++++++++--------- .github/workflows/webservices.yml | 12 ----- clone.json | 4 -- 5 files changed, 28 insertions(+), 96 deletions(-) delete mode 100644 .github/workflows/automerge.yml delete mode 100644 .github/workflows/clones_count.yml rename .github/workflows/{workflow.yml => ubuntu.yml} (58%) delete mode 100644 .github/workflows/webservices.yml delete mode 100644 clone.json diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index e8e5902..0000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: - status: {} - check_suite: - types: - - completed - -jobs: - automerge-action: - runs-on: ubuntu-latest - name: automerge - steps: - - name: checkout - uses: actions/checkout@v2 - - name: automerge-action - id: automerge-action - uses: conda-forge/automerge-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/clones_count.yml b/.github/workflows/clones_count.yml deleted file mode 100644 index 8ad6a42..0000000 --- a/.github/workflows/clones_count.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: GitHub Clone Count for 14 days at every 8 hours - -# Controls when the action will run. -on: - schedule: - - cron: "0 */8 * * *" - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Parse clone count using REST API - run: | - curl --user "${{ github.actor }}:${{ secrets.SECRET_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/traffic/clones \ - > clone.json - - - name: Add to git repo - run: | - git add . - git config --global user.name "GitHub Action" - git config --global user.email "action@github.com" - git commit -m "Automated clone.json update" - - - name: Push - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/workflow.yml b/.github/workflows/ubuntu.yml similarity index 58% rename from .github/workflows/workflow.yml rename to .github/workflows/ubuntu.yml index 8f19042..0894965 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/ubuntu.yml @@ -1,35 +1,47 @@ -name: CI -on: [push, pull_request] +name: Linux +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: Run: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest] #, macos-latest, windows-latest - python-version: ["3.9" ] # "3.7", "3.8", + os: [ ubuntu-latest] + python-version: ["3.9", "3.10", "3.11"] env: OS: ${{ matrix.os }} steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@master + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 - - uses: conda-incubator/setup-miniconda@v2 - with: - miniconda-version: "latest" - channels: conda-forge - allow-softlinks: true - channel-priority: flexible - show-channel-urls: true + - name: Install GDAL + run: | + python -m pip install --upgrade pip + pip install --no-cache-dir Cython + pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL + - name: Test GDAL installation + run: | + python -c "from osgeo import gdal" + gdalinfo --version - name: Install dependencies run: | - $CONDA/bin/conda env update --file environment.yml --name base - python setup.py install + pip install -r requirements.txt -r requirements-dev.txt + python setup.py install +# - name: Install dependencies +# run: | +# $CONDA/bin/mamba env update --file environment.yml --name base +# python setup.py install # - name: Lint with flake8 # run: | # # add CONDA/bin/ in front of everything @@ -42,7 +54,7 @@ jobs: # working-directory: ../ run: | pwd - $CONDA/bin/pytest --cov=pyramids --cov-report=xml + python -m pytest -vvv --cov=earth2observe --cov-report=xml # - name: Upload coverage to Codecov # uses: codecov/codecov-action@v1 @@ -56,10 +68,3 @@ jobs: # fail_ci_if_error: true # path_to_write_report: ./coverage/codecov_report.txt # verbose: true - - - name: Coveralls GitHub Action - uses: coverallsapp/github-action@1.1.3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage1.xml,./coverage2.xml - directory: ./coverage/reports/ diff --git a/.github/workflows/webservices.yml b/.github/workflows/webservices.yml deleted file mode 100644 index 78f51e6..0000000 --- a/.github/workflows/webservices.yml +++ /dev/null @@ -1,12 +0,0 @@ -on: repository_dispatch - -jobs: - webservices: - runs-on: ubuntu-latest - name: webservices - steps: - - name: webservices - id: webservices - uses: conda-forge/webservices-dispatch-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/clone.json b/clone.json deleted file mode 100644 index 84f855d..0000000 --- a/clone.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Must have push access to repository", - "documentation_url": "https://docs.github.com/rest/reference/repos#get-repository-clones" -}