-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7d4db71
Showing
78 changed files
with
11,734 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: "Retractobot CI" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: "opensafely-core/setup-action@v1" | ||
with: | ||
python-version: "3.10" | ||
install-just: true | ||
- name: Check formatting, linting and import sorting | ||
run: just check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:14 | ||
env: | ||
POSTGRES_USER: retractobot | ||
POSTGRES_PASSWORD: xxx | ||
POSTGRES_DB: retractobot | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: "opensafely-core/setup-action@v1" | ||
with: | ||
python-version: "3.10" | ||
install-just: true | ||
|
||
- name: Environment variables | ||
run: cp environment-sample environment | ||
|
||
- name: Install venv | ||
run: just devenv | ||
|
||
- name: Check migrations | ||
run: | | ||
just check-migrations | ||
- name: Run tests | ||
run: | | ||
just test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/osx,macos,linux,windows | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=osx,macos,linux,windows | ||
|
||
### Linux ### | ||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### OSX ### | ||
# General | ||
|
||
# Icon must end with two \r | ||
|
||
# Thumbnails | ||
|
||
# Files that might appear in the root of a volume | ||
|
||
# Directories potentially created on remote AFP share | ||
|
||
### Windows ### | ||
# Windows thumbnail cache files | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/osx,macos,linux,windows | ||
|
||
# Python | ||
__pycache__ | ||
*.pyc | ||
|
||
# Coverage | ||
.coverage | ||
htmlcov | ||
|
||
# IDEs | ||
.idea/ | ||
|
||
|
||
# Virtual environments | ||
.venv/ | ||
venv/ | ||
|
||
.pytest-cache/ | ||
|
||
|
||
# Application | ||
debug-last-sent-mails.mbox | ||
live-all-sent-mails.mbox | ||
environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
default_language_version: | ||
python: python3.10 | ||
|
||
repos: | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: just black | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
- id: ruff | ||
name: ruff | ||
entry: just ruff | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
- id: check-ast | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: detect-private-key | ||
|
||
- repo: https://github.com/stratasan/hadolint-pre-commit | ||
rev: cdefcb0 | ||
hooks: | ||
- id: hadolint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.10 |
Oops, something went wrong.