Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github CI #948

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
26 changes: 26 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -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@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down