Skip to content

[#73] 버전 정보 가져오기 #226

[#73] 버전 정보 가져오기

[#73] 버전 정보 가져오기 #226

Workflow file for this run

on:
push:
branches:
- dev
paths-ignore:
- '**/README.md'
pull_request:
branches:
- dev
env:
JAVA_VERSION: "21.x"
FLUTTER_VERSION: "3.24.3"
jobs:
analyze:
name: Analyze Flutter 🔍
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java ☕
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Flutter 🐦
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Analyze solved.ac API 🔍
run: |
ls
cd packages/apis/solved_api
flutter pub get
flutter analyze
- name: Analyze BOJ API 🔍
run: |
cd packages/apis/boj_api
flutter pub get
flutter analyze
- name: Analyze User Repository 🔍
run: |
cd packages/repositories/user_repository
flutter pub get
flutter analyze
- name: Analyze Search Repository 🔍
run: |
cd packages/repositories/search_repository
flutter pub get
flutter analyze
- name: Analyze Contest Repository 🔍
run: |
cd packages/repositories/contest_repository
flutter pub get
flutter analyze
- name: Analyze My.solved 🔍
run: |
flutter pub get
flutter analyze
test:
name: Test API & Repository 🛰️
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java ☕
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Flutter 🐦
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Test solved.ac API 🛰️
run: |
cd packages/apis/solved_api
flutter test
- name: Test BOJ API 🛰️
run: |
cd packages/apis/boj_api
flutter test
- name: Test User Repository 🛰️
run: |
cd packages/repositories/user_repository
flutter test
- name: Test Search Repository 🛰️
run: |
cd packages/repositories/search_repository
flutter test
- name: Test Contest Repository 🛰️
run: |
cd packages/repositories/contest_repository
flutter test
build:
name: Build Flutter 🛠️
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java ☕
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Flutter 🐦
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Build Web 🌐
run: |
mkdir ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
mkdir build
mkdir build/web
cd build/web
git init
git config --global user.name "w8385"
git config --global user.email "w8385@naver.com"
git remote add origin git@github.com:My-solved/My-solved.github.io.git
git pull origin main
git checkout main
cd ../../
flutter pub get
flutter build web --release --web-renderer html
cd build/web
git add .
git commit -m "Update web"
git push