From c6ed6f3db5321d3e63931ad61eb9758a18e8dc88 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Tue, 21 Jan 2025 10:47:14 +1300 Subject: [PATCH] add requirements.txt check --- .github/workflows/git-extension.yml | 18 ++++++++++++++++++ requirements.txt | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/git-extension.yml diff --git a/.github/workflows/git-extension.yml b/.github/workflows/git-extension.yml new file mode 100644 index 0000000..f99ccf8 --- /dev/null +++ b/.github/workflows/git-extension.yml @@ -0,0 +1,18 @@ +name: Check requirements.txt git URLs are properly formatted + +on: pull_request + +permissions: + contents: read + pull-requests: write + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: sed -i '/git\+/ { /\.git$/! s/$/.git/ }' requirements.txt + - uses: parkerbxyz/suggest-changes@v2 + with: + comment: 'Please change the following dependencies for consistency.' + event: 'REQUEST_CHANGES' diff --git a/requirements.txt b/requirements.txt index efcba11..694f6fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ duckdb geojson numpy<2 pandas -pygmt_helper @ git+https://github.com/ucgmsim/pygmt_helper +pygmt_helper @ git+https://github.com/ucgmsim/pygmt_helper.git qcore @ git+https://github.com/ucgmsim/qcore.git -source_modelling @ git+https://github.com/ucgmsim/source_modelling +source_modelling @ git+https://github.com/ucgmsim/source_modelling.git typer pytest