Skip to content

Commit

Permalink
dotfiles, CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mburns committed Jun 26, 2023
1 parent 32e3c75 commit e0adba6
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .busted
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
_all = {
coverage = true
},
default = {
verbose = true
},
apiUnit = {
tags = "api",
ROOT = {"spec/unit"},
verbose = true
}
}

48 changes: 48 additions & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "spec"

on: [push, pull_request]

jobs:
# this runs the tests in the docker image against live sqlite and openresty
docker:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: build
run: docker build -t pagesix-test .

- name: test
run: docker run pagesix-test

# this runs all generic lua tests
test:
strategy:
fail-fast: false
matrix:
luaVersion: ["5.1", "5.4", "luajit", "luajit-openresty"]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- uses: leafo/gh-actions-lua@master
with:
luaVersion: ${{ matrix.luaVersion }}

- uses: leafo/gh-actions-luarocks@master

- name: build
run: |
[[ "${{ matrix.luaVersion }}" =~ ^5\.[12]$ ]] && luarocks install luabitop || true
luarocks install busted
luarocks install moonscript
luarocks install tableshape
luarocks install lsqlite3
luarocks make
- name: test
run: |
busted -o utfTerminal -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ image_cache/
/.luarocks

*.sqlite
doc/
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Lua.runtime.version": "LuaJIT",
"Lua.diagnostics.globals": [
"ngx"
],
"Lua.workspace.library": [
"${3rd}/OpenResty/library"
],
"todo-tree.tree.scanMode": "workspace"
}
24 changes: 18 additions & 6 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@ app = "pagesix"
primary_region = "sea"

[build]
image = "karai17/lapis-centos:latest"
dockerfile = "Dockerfile.prod"

[deploy]
release_command = "lapis migrate"
strategy = "immediate"

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0

[mounts]
source="data"
destination="/var/data"

[[statics]]
guest_path = "/app/static"
url_prefix = "/static"

0 comments on commit e0adba6

Please sign in to comment.