-
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
1 parent
ff4ab7f
commit 1dea4e0
Showing
4 changed files
with
65 additions
and
53 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 |
---|---|---|
@@ -1,13 +1,25 @@ | ||
name: backend-linting | ||
|
||
on: | ||
push: | ||
branches: [secrets-test] | ||
pull_request: | ||
branches: [main, development, secrets-test] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
show-name: | ||
test: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Show username | ||
run: echo ${{ secrets.USERNAME }} | sed 's/./& /g' | ||
- name: Add permission to remove contents of previous action script | ||
run: echo ${{ secrets.SUDO }} | sudo -S chown -R $USER:$USER /home/selab2/actions-runner/_work/UGent-7/ | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --directory=./backend | ||
- name: Execute linting checks | ||
run: flake8 --config ./backend/.flake8 ./backend |
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
name: deploy | ||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
# workflow_dispatch: | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
# jobs: | ||
# deploy: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Deploy | ||
# uses: appleboy/ssh-action@master | ||
# with: | ||
# host: ${{ secrets.HOST }} | ||
# username: ${{ secrets.USERNAME }} | ||
# key: ${{ secrets.SSH_KEY }} | ||
# port: ${{ secrets.PORT }} | ||
# script: | | ||
# cd UGent-7 | ||
# docker-compose -f production.yml down | ||
# git pull --force | ||
# docker-compose -f production.yml build --no-cache | ||
# docker-compose -f production.yml up -d | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.SSH_KEY }} | ||
port: ${{ secrets.PORT }} | ||
script: | | ||
cd UGent-7 | ||
docker-compose -f production.yml down | ||
git pull --force | ||
docker-compose -f production.yml build --no-cache | ||
docker-compose -f production.yml up -d |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: frontend-linting | ||
|
||
# on: | ||
# pull_request: | ||
# branches: [main, development] | ||
# workflow_dispatch: | ||
on: | ||
pull_request: | ||
branches: [main, development] | ||
workflow_dispatch: | ||
|
||
# jobs: | ||
# linting-checks: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Install dependencies | ||
# run: cd frontend; npm install | ||
# - name: Run ESLint | ||
# run: cd frontend; npm run lint | ||
jobs: | ||
linting-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: cd frontend; npm install | ||
- name: Run ESLint | ||
run: cd frontend; npm run lint |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: tests | ||
|
||
# on: | ||
# pull_request: | ||
# branches: [main, development] | ||
# workflow_dispatch: | ||
on: | ||
pull_request: | ||
branches: [main, development] | ||
workflow_dispatch: | ||
|
||
# jobs: | ||
# test: | ||
# runs-on: self-hosted | ||
# steps: | ||
# - name: Add permission to remove contents of previous action script | ||
# run: echo ${{ secrets.SUDO }} | sudo -S chown -R $USER:$USER /home/selab2/actions-runner/_work/UGent-7/ | ||
# - uses: actions/checkout@v4 | ||
# - name: Run tests | ||
# run: echo ${{ secrets.SUDO }} | sudo -S ./test.sh -c | ||
jobs: | ||
test: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Add permission to remove contents of previous action script | ||
run: echo ${{ secrets.SUDO }} | sudo -S chown -R $USER:$USER /home/selab2/actions-runner/_work/UGent-7/ | ||
- uses: actions/checkout@v4 | ||
- name: Run tests | ||
run: echo ${{ secrets.SUDO }} | sudo -S ./test.sh -c |