From e508e4399dd74a3a27a98e8f8dfe5ee2d55cdfe2 Mon Sep 17 00:00:00 2001 From: Colton English Date: Sat, 30 Dec 2023 01:07:13 -0700 Subject: [PATCH 1/4] gpt the travis-ci to github actions --- .github/workflows/python-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/python-ci.yml diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml new file mode 100644 index 00000000..36481dff --- /dev/null +++ b/.github/workflows/python-ci.yml @@ -0,0 +1,26 @@ +name: Python CI +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install flake8 -r requirements.txt + - name: Run flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 bin lib --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 bin lib --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Run tests + run: | + true # pytest --capture=sys # add other tests here From 856c196583a8c19dea58d76f6a91bc274c008ba4 Mon Sep 17 00:00:00 2001 From: colton Date: Sat, 30 Dec 2023 01:35:57 -0700 Subject: [PATCH 2/4] update dependencies --- .github/dependabot.yml | 34 +++++++++++++++++++++++++++++++++ .github/workflows/python-ci.yml | 4 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..c8a3861b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,34 @@ +version: 2 +updates: + # Enable updates for Python dependencies + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + # Specify labels for pull requests + labels: + - "dependencies" + - "python" + # Enable updates for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + # Specify labels for pull requests + labels: + - "dependencies" + - "github-actions" + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + labels: + - "dependencies" + - "go" + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "daily" + labels: + - "dependencies" + - "docker" diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 36481dff..d69f4d56 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -7,9 +7,9 @@ jobs: matrix: python-version: [3.7] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From 16e1883e62144b1c07315a012dacb9d193cbbe84 Mon Sep 17 00:00:00 2001 From: colton Date: Sat, 30 Dec 2023 01:48:46 -0700 Subject: [PATCH 3/4] Adding a build badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8071c595..dcb924c2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ *wttr.in — the right way to ~check~ `curl` the weather!* +[![Python CI](https://github.com/chubin/wttr.in/actions/workflows/python-ci.yml/badge.svg)](https://github.com/chubin/wttr.in/actions/workflows/python-ci.yml) + wttr.in is a console-oriented weather forecast service that supports various information representation methods like terminal-oriented ANSI-sequences for console HTTP clients (curl, httpie, or wget), HTML for web browsers, or PNG for graphical viewers. From 366b20fc7257c1a53e82467d594558592fe09eb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Dec 2023 09:01:09 +0000 Subject: [PATCH 4/4] Bump alpine from 3.16 to 3.19 Bumps alpine from 3.16 to 3.19. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7ae75da4..6e88dfbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN go get -u github.com/mattn/go-colorable && \ cd /app && CGO_ENABLED=0 go build . # Application stage -FROM alpine:3.16 +FROM alpine:3.19 WORKDIR /app