Skip to content

Commit

Permalink
♻️ Merge pull request #30 from HidemaruOwO/fix/test-workflow
Browse files Browse the repository at this point in the history
Fix/test workflow
  • Loading branch information
HidemaruOwO authored Sep 20, 2023
2 parents 72d5dd1 + 0e2d6d5 commit 26bca61
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 18 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ name: "Build"
on:
push:

permissions:
contents: write
repository-projects: write
actions: write
statuses: read

jobs:
release:
name: Release
# runs-on: ubuntu-latest

# Multi platfrom support
# Multi platform support
strategy:
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
Expand All @@ -18,7 +24,7 @@ jobs:
steps:
- name: Wait Tests
id: test_result
uses: Sibz/await-status-action@v1.0.1
uses: Sibz/await-status-action@v1
with:
contexts: test-status
authToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,30 @@ on:
branches:
- "develop"

permissions:
contents: write
repository-projects: write
actions: write
statuses: read

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Wait Tests
id: test_result
uses: Sibz/[email protected]
with:
contexts: test-status
authToken: ${{ secrets.GITHUB_TOKEN }}
timeout: 30
- name: Check Test Result
if: steps.test_result.outputs.result != 'success'
run: |
echo "feiled ${{ steps.test_result.outputs.failedCheckNames }}"
echo "status ${{ steps.test_result.outputs.failedCheckStates }}"
exit 1
- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -22,7 +42,7 @@ jobs:
shell: bash
id: extract_branch
- name: Setup
run: echo "Set up your programing language here."
run: echo "Set up your programming language here."
# uses: actions/setup-go@v2
- name: Install formatter
run: echo "Install formatter (Example; npm install prettier)"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Referrence: https://qiita.com/shun198/items/176037432f7efc8fde26
# Reference: https://qiita.com/shun198/items/176037432f7efc8fde26

name: Create Release Note

Expand All @@ -10,7 +10,9 @@ on:
- develop

permissions:
contents: read
contents: write
repository-projects: write
actions: write

jobs:
release:
Expand All @@ -22,4 +24,3 @@ jobs:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@ on:
types:
- published

permissions:
contents: write
repository-projects: write
actions: write
statuses: read

jobs:
release:
name: Release
runs-on: ubuntu-latest

# Multi platfrom support
# Multi platform support
# strategy:
# matrix:
# platform: [macos-latest, ubuntu-latest, windows-latest]
# fail-fast: false
# matrix:
# platform: [macos-latest, ubuntu-latest, windows-latest]
# fail-fast: false

# runs-on: ${{ matrix.platform }}

Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Test CLI
on:
push:

permissions:
statuses: write

jobs:
test:
Expand All @@ -13,16 +15,25 @@ jobs:
uses: actions/checkout@v3

- name: Test
run: echo "Write Test here"

test-status:
name: Test status
runs-on: ubuntu-latest
needs: test
steps:
id: test_step
continue-on-error: true
run: |
echo "Write Test here"
- name: Set Check Status Success
uses: Sibz/[email protected]
uses: Sibz/github-status-action@v1
if: steps.test_step.outcome == 'success'
with:
context: test-status
authToken: ${{ secrets.GITHUB_TOKEN }}
state: success
- name: Set Check Status Failure
uses: Sibz/github-status-action@v1
if: steps.test_step.outcome == 'failure'
with:
context: test-status
authToken: ${{ secrets.GITHUB_TOKEN }}
state: failure

- name: Fail
uses: Sibz/[email protected]
if: steps.test_step.outcome == 'failure'
5 changes: 5 additions & 0 deletions .github/workflows/translate-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
paths:
- ".github/workflows/translate-readme.yml"
- "README.md"

permissions:
contents: write
repository-projects: write

jobs:
translate:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 26bca61

Please sign in to comment.