refactor: contest notification #164
Workflow file for this run
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
on: | |
push: | |
branches: | |
- dev | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: | |
- dev | |
env: | |
JAVA_VERSION: "21.x" | |
FLUTTER_VERSION: "3.19.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: solved.ac API Analyze 🔍 | |
run: | | |
ls | |
cd packages/apis/solved_api | |
flutter pub get | |
flutter analyze | |
- name: BOJ API Analyze 🔍 | |
run: | | |
cd packages/apis/boj_api | |
flutter pub get | |
flutter analyze | |
- name: User Repository Analyze 🔍 | |
run: | | |
cd packages/repositories/user_repository | |
flutter pub get | |
flutter analyze | |
- name: Search Repository Analyze 🔍 | |
run: | | |
cd packages/repositories/search_repository | |
flutter pub get | |
flutter analyze | |
- name: Contest Repository Analyze 🔍 | |
run: | | |
cd packages/repositories/contest_repository | |
flutter pub get | |
flutter analyze | |
- name: My.solved Analyze 🔍 | |
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: solved.ac API Test 🛰️ | |
run: | | |
cd packages/apis/solved_api | |
flutter test | |
- name: BOJ API Test 🛰️ | |
run: | | |
cd packages/apis/boj_api | |
flutter test | |
- name: User Repository Test 🛰️ | |
run: | | |
cd packages/repositories/user_repository | |
flutter test | |
- name: Search Repository Test 🛰️ | |
run: | | |
cd packages/repositories/search_repository | |
flutter test | |
- name: Contest Repository Test 🛰️ | |
run: | | |
cd packages/repositories/contest_repository | |
flutter test | |
build: | |
name: Build Flutter 🛠️ | |
runs-on: ubuntu-latest | |
needs: [ analyze, test ] | |
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 | |
flutter pub get | |
flutter build web --release --web-renderer html | |
cd build/web | |
git init | |
git config --global user.name "w8385" | |
git config --global user.email "[email protected]" | |
git config --global init.defaultBranch main | |
git remote add origin [email protected]:My-solved/My-solved.github.io.git | |
git add . | |
git commit -m "pages update" | |
git push --set-upstream origin master |