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

Port CI to GitHub Actions and remove CircleCI #464

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_DB: test_db
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Set up database
run: |
sudo apt-get install -y postgresql-client
export DATABASE_URL=postgres://postgres:@localhost/test_db
python manage.py migrate --noinput
python manage.py collectstatic --noinput
- name: Run tests
run: |
export DATABASE_URL=postgres://postgres:@localhost/test_db
python manage.py test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# simonwillisonblog

[![CircleCI](https://circleci.com/gh/simonw/simonwillisonblog.svg?style=svg)](https://circleci.com/gh/simonw/simonwillisonblog)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=simonw/simonwillisonblog)](https://dependabot.com)
[![GitHub Actions](https://github.com/simonw/simonwillisonblog/actions/workflows/ci.yml/badge.svg)](https://github.com/simonw/simonwillisonblog/actions)

The code that runs my weblog, http://simonwillison.net/