Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #33

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
41098df
Massive auditing change
cmaloney111 Apr 26, 2024
d913fb1
fix images
GiseleBr678 May 11, 2024
17a6b4f
Merge pull request #30 from TailUFPB/branch-images
jonasgabriel18 May 13, 2024
fc61a86
Update develop.yml
cmaloney111 May 13, 2024
3ec629d
Develop
cmaloney111 May 13, 2024
e2f8057
Add environment yml
cmaloney111 May 13, 2024
3a51a7a
environment.yml
cmaloney111 May 13, 2024
6cef87d
Update develop.yml
cmaloney111 May 13, 2024
09ab522
Update develop.yml
cmaloney111 May 13, 2024
2801926
Update develop.yml
cmaloney111 May 13, 2024
32131dc
update env.yml
cmaloney111 May 13, 2024
ee7ef6d
Update develop.yml
cmaloney111 May 13, 2024
f4209cc
Update develop.yml
cmaloney111 May 13, 2024
b006e68
Update develop.yml
cmaloney111 May 13, 2024
838a167
Change about links
cmaloney111 May 13, 2024
a4cc165
search for app
cmaloney111 May 13, 2024
8c8f6ef
remove path and fs
cmaloney111 May 13, 2024
904724a
change app.spec
cmaloney111 May 13, 2024
9ae8e73
Update develop.yml
cmaloney111 May 13, 2024
8629088
change app.spec
cmaloney111 May 13, 2024
e1505f0
Update develop.yml
cmaloney111 May 13, 2024
a3d4ad0
change app.spec
cmaloney111 May 13, 2024
e8c86a0
Update develop.yml
cmaloney111 May 13, 2024
4fc12ed
Change app.spec location
cmaloney111 May 13, 2024
e303725
No optimize
cmaloney111 May 13, 2024
022d86c
Update app.spec
cmaloney111 May 13, 2024
3ce3e52
Change app.spec
cmaloney111 May 13, 2024
5a0e049
change app.spec
cmaloney111 May 13, 2024
6d827db
change app.spec
cmaloney111 May 13, 2024
9d9e15c
change app.spec
cmaloney111 May 13, 2024
d5d1d33
Update develop.yml
cmaloney111 May 13, 2024
419f936
change package.json
cmaloney111 May 13, 2024
66a08d2
change package.json
cmaloney111 May 13, 2024
13246b3
Get that scipy!
cmaloney111 May 14, 2024
3ad75cb
Update develop.yml
cmaloney111 May 14, 2024
bead507
Update requirements.txt
cmaloney111 May 14, 2024
48c5294
Update develop.yml
cmaloney111 May 14, 2024
d63d0f5
No matplotlib
cmaloney111 May 14, 2024
6a2782b
Update develop.yml
cmaloney111 May 14, 2024
9918da2
Remove unnecessary requirements
cmaloney111 May 14, 2024
3b2d290
Update develop.yml
cmaloney111 May 14, 2024
3abdba7
remove unnnecessary extra files
cmaloney111 May 14, 2024
8d8cb7b
Update develop.yml
cmaloney111 May 14, 2024
db2edda
Update develop.yml
cmaloney111 May 14, 2024
335dffa
Update develop.yml
cmaloney111 May 14, 2024
684dd2c
Update develop.yml
cmaloney111 May 14, 2024
e138473
Update develop.yml for windows
cmaloney111 May 14, 2024
13a0a0e
Update develop.yml
cmaloney111 May 14, 2024
0e421f5
First release using conda and pyinstaller for quicker setup
cmaloney111 May 14, 2024
9acc4f3
Update develop.yml
cmaloney111 May 15, 2024
fccc8dc
Update develop.yml
cmaloney111 May 15, 2024
0949be1
Delete .github/workflows/create-release.yml
cmaloney111 May 15, 2024
023755f
Update main.yml
cmaloney111 May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/create-release.yml

This file was deleted.

133 changes: 34 additions & 99 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,30 @@
name: CI
# Controls when the workflow will run
on:
push:
branches: ["develop"]

# Prevent duplicate workflows from running
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Static tests don't involve any logic or context.
# They are just a set of tests that can detect if we are not introducing any faulty code.
static-test:
name: 🔬 Static tests
runs-on: ubuntu-latest
build:
name: 🏗️ Build
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: ⎔ Setup Node
uses: actions/setup-node@v3
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
cache: "npm"

- name: 🟨 Setup Python
uses: actions/setup-python@v3
activate-environment: default
environment-file: api/environment.yml

- name: 📦 Install Node dependencies
run: npm install

# # Unit tests are tests that are not dependent on any external service.
# # Usually, they are tests that are testing the logic of a specific function or component.
unit-test:
needs: [static-test]
name: 🚦 Unit tests
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
Expand All @@ -51,90 +37,26 @@ jobs:

- name: 🟨 Setup Python
uses: actions/setup-python@v3

- name: 📦 Install dependencies
run: npm install

- name: 🚦 Run unit tests
run: npm test

# # Integration tests are tests that are dependent on external services.
integration-test:
needs: [static-test]
name: 🚥 Integration tests
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2
python-version: 3.12.3

- name: ⎔ Setup Node
uses: actions/setup-node@v3
with:
cache: "npm"
- name: Install pip dependencies
run: pip install -r api/requirements.txt pyinstaller==6.6.0

- name: 🟨 Setup Python
uses: actions/setup-python@v3
- name: Build flask exe
run: pyinstaller api/app.spec

- name: 📦 Install dependencies
- name: Install dependencies
run: npm install

# - name: 🐳 Docker compose
# run:
# docker-compose up -d && sleep 3 && pnpm prisma migrate reset --force
# --skip-seed

- name: 🚦 Run integration tests
run: npm test

# Create Build
build:
needs: [static-test, unit-test, integration-test]
name: 🏗️ Build
runs-on: ubuntu-latest
steps:
- name: Set up Wine
uses: actions/setup-node@v2
with:
node-version: "14"

- name: Install Wine64
run: sudo apt update && sudo apt install wine64

- name: Install Wine32
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine32

- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: ⎔ Setup Node
uses: actions/setup-node@v3
with:
cache: "npm"

- name: 🟨 Setup Python
uses: actions/setup-python@v3

- name: 📦 Install dependencies
run: npm install

- name: 🏗️ Build
run: npm run build

#- name: 📦 Electron Package
# run: npx electron-packager . LinguifAI --platform=win32 --arch=x64 --out=dist

- name: 📦 Electron Builder
run: npm run electron:package:win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Print directory tree
run: tree

- name: Get latest release number
id: get_latest_release
uses: actions/github-script@v4
Expand All @@ -154,8 +76,22 @@ jobs:
console.log(`::set-output name=new_version::${newVersion}`);

- name: Rename file
run: mv -f dist/LinguifAI\ Setup\ 0.1.0.exe dist/LinguifAI\ Setup\ ${{ steps.get_latest_release.outputs.new_version }}.exe
run: ren "dist\LinguifAI Setup 0.1.0.exe" "LinguifAI Setup ${{ steps.get_latest_release.outputs.new_version }}.exe"

- name: Get latest commit message
id: get_latest_commit_message
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const response = await github.repos.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 1,
ref: 'refs/heads/develop'
});
console.log(`::set-output name=commit_message::${response.data[0].commit.message}`);

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
Expand All @@ -165,5 +101,4 @@ jobs:
tag_name: v${{ steps.get_latest_release.outputs.new_version }}
name: v${{ steps.get_latest_release.outputs.new_version }}
prerelease: true
body: |
Descrição do release aqui
body: ${{ steps.get_latest_commit_message.outputs.commit_message }}
61 changes: 39 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,20 @@ jobs:
build:
needs: [static-test, unit-test, integration-test]
name: 🏗️ Build
runs-on: ubuntu-latest
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- name: Set up Wine
uses: actions/setup-node@v2
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
node-version: "14"

- name: Install Wine64
run: sudo apt update && sudo apt install wine64
fetch-depth: 2

- name: Install Wine32
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine32
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: default
environment-file: api/environment.yml

- name: ⬇️ Checkout repo
uses: actions/checkout@v4
Expand All @@ -120,21 +119,26 @@ jobs:

- name: 🟨 Setup Python
uses: actions/setup-python@v3
with:
python-version: 3.12.3

- name: 📦 Install dependencies
run: npm install
- name: Install pip dependencies
run: pip install -r api/requirements.txt pyinstaller==6.6.0

- name: 🏗️ Build
run: npm run build
- name: Build flask exe
run: pyinstaller api/app.spec

#- name: 📦 Electron Package
# run: npx electron-packager . LinguifAI --platform=win32 --arch=x64 --out=dist
- name: Install dependencies
run: npm install

- name: 📦 Electron Builder
run: npm run electron:package:win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Print directory tree
run: tree

- name: Get latest release number
id: get_latest_release
uses: actions/github-script@v4
Expand All @@ -145,7 +149,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 10
});
});

const latestPreRelease = response.data[0];
const preReleaseTag = latestPreRelease.name;
Expand All @@ -154,8 +158,22 @@ jobs:
console.log(`::set-output name=new_version::${newVersion}`);

- name: Rename file
run: mv -f dist/LinguifAI\ Setup\ 0.1.0.exe dist/LinguifAI\ Setup\ ${{ steps.get_latest_release.outputs.new_version }}.exe
run: ren "dist\LinguifAI Setup 0.1.0.exe" "LinguifAI Setup ${{ steps.get_latest_release.outputs.new_version }}.exe"

- name: Get latest commit message
id: get_latest_commit_message
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const response = await github.repos.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 1,
ref: 'refs/heads/add-orders'
});
console.log(`::set-output name=commit_message::${response.data[0].commit.message}`);

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
Expand All @@ -165,5 +183,4 @@ jobs:
tag_name: v${{ steps.get_latest_release.outputs.new_version }}
name: v${{ steps.get_latest_release.outputs.new_version }}
prerelease: true
body: |
Descrição do release aqui
body: ${{ steps.get_latest_commit_message.outputs.commit_message }}
Loading
Loading