move services/bright to apps/bright
This commit is contained in:
parent
e94514b067
commit
aa75c224fc
@ -1 +1 @@
|
|||||||
{"last_found_secrets": [{"match": "0854bfbb9c5e31e8c4cb7e69740d16b897e6ddf1a78595f5c54fc1287d070936", "name": "Generic High Entropy Secret - commit://staged/infra/k3s_kubeconfig.yaml"}, {"match": "452f437daf87b2ed4091dc0ecc764dc678c7af19c0bd7524048aba8d90de784f", "name": "Base64 Elliptic Curve Private Key - commit://staged/infra/k3s_kubeconfig.yaml"}, {"match": "3b4e99a1da49206e7520272a2c6671a502b7378fce5d5e2e72dbcd1b4c1640f4", "name": "Generic Password - commit://staged/infra/terraform.tfstate"}, {"match": "eb463a0daedea3af5d49bc7579a670cfa4c595853e66b4b2938685f2370519de", "name": "OpenSSH Private Key - commit://staged/infra/terraform.tfstate"}]}
|
{"last_found_secrets": [{"match": "f5c0ea409f9fc16f713ef47c76d4376c3f6ae0d0124f358f7e314dc81879b999", "name": "Generic High Entropy Secret - commit://staged/apps/bright/torrentfile-0.9.1/PKG-INFO"}]}
|
@ -22,3 +22,14 @@ jobs:
|
|||||||
dockerfile: dockerfiles/opentracker.dockerfile
|
dockerfile: dockerfiles/opentracker.dockerfile
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
|
||||||
|
- uses: mr-smithers-excellent/docker-build-push@v6
|
||||||
|
name: Build futureporn/bright
|
||||||
|
with:
|
||||||
|
image: futureporn/bright
|
||||||
|
tags: latest
|
||||||
|
registry: gitea.futureporn.net
|
||||||
|
dockerfile: dockerfiles/bright.dockerfile
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
@ -1,26 +1,142 @@
|
|||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- "main"
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '6 */12 * * *'
|
- cron: "6 */12 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
# test_javascript:
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
environment: docker
|
# environment: docker
|
||||||
|
# steps:
|
||||||
|
# - name: Check out code
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# - name: Setup pnpm
|
||||||
|
# uses: pnpm/action-setup@v4
|
||||||
|
# with:
|
||||||
|
# run_install: |
|
||||||
|
# - recursive: true
|
||||||
|
# args: [--frozen-lockfile, --strict-peer-dependencies]
|
||||||
|
|
||||||
|
# - name: Unit test all packages
|
||||||
|
# run: pnpm test -r
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Tests & Checks
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
timeout-minutes: 600
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
env:
|
||||||
|
MIX_ENV: test
|
||||||
|
TRACKER_URL: http://localhost:8666/announce
|
||||||
|
WHITELIST_URL: http://localhost:8666/whitelist
|
||||||
|
WHITELIST_USERNAME: ${{ secrets.WHITELIST_USERNAME }}
|
||||||
|
WHITELIST_PASSWORD: ${{ secrets.WHITELIST_PASSWORD }}
|
||||||
|
WHITELIST_PASSWORD_CADDY: ${{ secrets.WHITELIST_PASSWORD_CADDY }}
|
||||||
|
WHITELIST_FEED_URL: http://localhost:4000/torrents
|
||||||
|
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}
|
||||||
|
AWS_HOST: ${{ secrets.AWS_HOST }}
|
||||||
|
AWS_REGION: ${{ secrets.AWS_REGION }}
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
PUBLIC_S3_ENDPOINT: ${{ secrets.PUBLIC_S3_ENDPOINT }}
|
||||||
|
SITE_URL: https://futureporn.net
|
||||||
|
|
||||||
|
# @blocking @see https://gitea.com/gitea/act_runner/issues/506
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres:16
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: bright_test
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
|
||||||
|
opentracker:
|
||||||
|
image: gitea.futureporn.net/futureporn/opentracker:latest
|
||||||
|
ports:
|
||||||
|
- 8666:8666
|
||||||
|
env:
|
||||||
|
WHITELIST_USERNAME: ${{ secrets.WHITELIST_USERNAME }}
|
||||||
|
WHITELIST_PASSWORD_CADDY: ${{ secrets.WHITELIST_PASSWORD_CADDY }}
|
||||||
|
# @todo delete WHITELIST_PASSWORD ASAP. we're waiting for futureporn/opentracker to update
|
||||||
|
# We've corrected it to WHITELIST_PASSWORD_CADDY in the Caddyfile,
|
||||||
|
# but the change isn't live in the container yet.
|
||||||
|
WHITELIST_PASSWORD: ${{ secrets.WHITELIST_PASSWORD_CADDY }}
|
||||||
|
WHITELIST_FEED_URL: https://bright.futureporn.net/torrents
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Setup FFmpeg
|
||||||
uses: actions/checkout@v3
|
uses: FedericoCarboni/setup-ffmpeg@v3
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup futureporn cache dir
|
||||||
uses: pnpm/action-setup@v4
|
run: |
|
||||||
|
mkdir -p ~/.cache/futureporn
|
||||||
|
|
||||||
|
- name: Setup PIP packages
|
||||||
|
uses: insightsengineering/pip-action@v2
|
||||||
with:
|
with:
|
||||||
run_install: |
|
packages: |
|
||||||
- recursive: true
|
torrentfile
|
||||||
args: [--frozen-lockfile, --strict-peer-dependencies]
|
|
||||||
|
|
||||||
- name: Unit test all packages
|
- name: Checkout code
|
||||||
run: pnpm test -r
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Erlang and Elixir
|
||||||
|
uses: erlef/setup-beam@v1.17
|
||||||
|
with:
|
||||||
|
elixir-version: "1.16.0-otp-26"
|
||||||
|
otp-version: "26.0"
|
||||||
|
|
||||||
|
- name: Mix and build cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
deps
|
||||||
|
_build
|
||||||
|
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-mix-
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: mix deps.get
|
||||||
|
working-directory: ./apps/bright
|
||||||
|
|
||||||
|
- name: Code analyzers
|
||||||
|
run: |
|
||||||
|
mix format --check-formatted
|
||||||
|
mix compile --warnings-as-errors
|
||||||
|
working-directory: ./apps/bright
|
||||||
|
|
||||||
|
# @blocking @see https://github.com/nektos/act/issues/2529
|
||||||
|
- name: Unit tests
|
||||||
|
run: |
|
||||||
|
mix test --only=unit
|
||||||
|
working-directory: ./apps/bright
|
||||||
|
|
||||||
|
- name: Integration tests
|
||||||
|
run: |
|
||||||
|
mix test --only=integration
|
||||||
|
working-directory: ./apps/bright
|
||||||
|
|
||||||
|
- name: Acceptance tests
|
||||||
|
run: |
|
||||||
|
mix test --only=acceptance
|
||||||
|
working-directory: ./apps/bright
|
||||||
|
|
||||||
|
- name: Uncategorized tests (ideally there should be none)
|
||||||
|
run: |
|
||||||
|
mix test --exclude=acceptance --exclude=unit --exclude=integration
|
||||||
|
working-directory: ./apps/bright
|
||||||
|
|
||||||
|
- name: Code coverage
|
||||||
|
run: |
|
||||||
|
mix coveralls
|
||||||
|
working-directory: ./apps/bright
|
||||||
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@ -2,6 +2,7 @@
|
|||||||
"recommendations": [
|
"recommendations": [
|
||||||
"helm-ls.helm-ls",
|
"helm-ls.helm-ls",
|
||||||
"tchoupinax.tilt",
|
"tchoupinax.tilt",
|
||||||
"redhat.vscode-yaml"
|
"redhat.vscode-yaml",
|
||||||
|
"elixir-lsp.elixir-ls"
|
||||||
]
|
]
|
||||||
}
|
}
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -6,5 +6,8 @@
|
|||||||
],
|
],
|
||||||
"https://json.schemastore.org/kustomization.json": "file:///home/cj/Documents/futureporn-monorepo/clusters/production/infrastructure.yaml"
|
"https://json.schemastore.org/kustomization.json": "file:///home/cj/Documents/futureporn-monorepo/clusters/production/infrastructure.yaml"
|
||||||
},
|
},
|
||||||
"editor.tabSize": 2
|
"editor.tabSize": 2,
|
||||||
|
"elixirLS.projectDir": "apps/bright",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"elixirLS.useCurrentRootFolderAsProjectDir": true
|
||||||
}
|
}
|
4
apps/README.md
Normal file
4
apps/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
This directory is for complete applications that are NOT node.js applications.
|
||||||
|
|
||||||
|
For node apps, see ../services
|
||||||
|
For node app dependencies, see ../packages
|
13
apps/bright/.coveralls.json
Normal file
13
apps/bright/.coveralls.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"default_stop_words": [
|
||||||
|
"defmodule",
|
||||||
|
"defrecord",
|
||||||
|
"defimpl",
|
||||||
|
"def.+(.+\/\/.+).+do"
|
||||||
|
],
|
||||||
|
"custom_stop_words": [],
|
||||||
|
"coverage_options": {
|
||||||
|
"treat_no_relevant_lines_as_covered": true,
|
||||||
|
"minimum_coverage": 60
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 743 B |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user