Skip to content

Commit d875ff9

Browse files
Merge remote-tracking branch 'origin/main' into test_individual_pending_requests
2 parents 48b6205 + 9f0bdfa commit d875ff9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2748
-1489
lines changed

.env.sample

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/config-validator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# github action to run commit-msg hook on pull request commits and push commits to master branch
2-
name: config-validator
2+
name: Validate sample config
33
on: pull_request
44
jobs:
55
config-validator:

.github/workflows/docker-push.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Push enigma image to Docker
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out the repo
12+
uses: actions/checkout@v3
13+
- name: Set up QEMU
14+
uses: docker/setup-qemu-action@v2
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v2
17+
- name: Docker metadata
18+
id: meta
19+
uses: docker/metadata-action@v4
20+
with:
21+
images: |
22+
browserstack/enigma
23+
tags: |
24+
type=semver,pattern=v{{version}}
25+
type=semver,pattern=v{{major}}.{{minor}}
26+
type=semver,pattern=v{{major}}
27+
- name: Login to DockerHub
28+
uses: docker/login-action@v2
29+
with:
30+
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
password: ${{ secrets.DOCKERHUB_TOKEN }}
32+
- name: Build and push
33+
uses: docker/build-push-action@v4
34+
with:
35+
context: .
36+
push: true
37+
platforms: linux/amd64, linux/arm64/v8
38+
target: web
39+
tags: ${{ steps.meta.outputs.tags }}
40+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- .github/workflows/semgrep.yml
99
schedule:
1010
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
11-
- cron: 12 15 * * *
11+
- cron: 0 7 * * *
1212
jobs:
1313
semgrep:
1414
name: Scan

.github/workflows/unit-tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Unit Tests and Lint
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-version: ['3.8', '3.9', '3.10', '3.11']
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Set up Python ${{ matrix.python-version }}
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: ${{ matrix.python-version }}
15+
- name: Install dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install pytest
19+
pip install -r requirements.txt
20+
- name: Ensure Config
21+
run: cp config.json.sample config.json
22+
- name: Setup access modules code base
23+
run: python -m scripts.clone_access_modules
24+
- name: Ensure access modules dependencies
25+
run: |
26+
pip install -r Access/access_modules/requirements.txt --no-cache-dir --ignore-installed
27+
- name: Lint code base
28+
run: python -m pylama Access/accessrequest_helper.py scripts
29+
- name: Test with pytest
30+
run: python -m pytest -v --cov --disable-warnings

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ config.json
22
__pycache__/
33
*.py[cod]
44
db.sqlite3
5-
.env
65

76
# Mac OS X files
87
.DS_Store
@@ -26,5 +25,8 @@ Access/access_modules
2625
mounts/
2726
public/
2827

28+
#Access Modules
29+
Access/access_modules
30+
2931
# make lint sideeffect
3032
lint_issues

.semgrepignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.md
2+
3+
nginx.conf.sample

0 commit comments

Comments
 (0)