Skip to content

Commit

Permalink
chore: Improve github actions workflows (#1210)
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Jelinek <[email protected]>
  • Loading branch information
djelinek authored Mar 22, 2024
1 parent 261e331 commit fbcadd4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/insiders.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Insiders CI
name: 🚀 Insiders CI

on:
schedule:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main CI
name: 🏗️ Main CI

on:
push:
Expand All @@ -25,18 +25,18 @@ jobs:
check:
if: always()
runs-on: ubuntu-latest
name: Status Check
name: 🟢 Status Check
needs: [ test ]
steps:
- name: Test Matrix Result
- name: ℹ️ Test Matrix Result
run: |
echo result = ${{ needs.test.result }}
- name: Status Check - success
- name: Status Check - success
if: ${{ needs.test.result == 'success' }}
run: |
echo "All tests successfully completed!"
exit 0
- name: Status Check - failure
- name: Status Check - failure
if: ${{ needs.test.result != 'success' }}
run: |
echo "Status Check failed!"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: NodeJS CI
name: 💎 NodeJS CI

on:
schedule:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/publish-wiki.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Publish wiki
name: 📖 Publish wiki

on:
push:
branches: [ main ]
Expand All @@ -17,5 +18,7 @@ jobs:
publish-wiki:
runs-on: ubuntu-latest
steps:
- name: 👷‍♀️ Checkout
- uses: actions/checkout@v4
- name: 📖 Build Wiki
- uses: Andrew-Chen-Wang/github-wiki-action@v4
4 changes: 3 additions & 1 deletion .github/workflows/stalebot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# https://github.com/actions/stale
name: 'Close stale issues and PRs'
name: 🗄️ Close Stale Issues and PRs

on:
schedule:
- cron: '30 1 * * *'
Expand All @@ -8,6 +9,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: 🗄️ Close Inactive
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/template-main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main CI - template
name: 📄 Main CI - template

on:
workflow_call:
Expand Down Expand Up @@ -30,36 +30,36 @@ jobs:
TEST_RESOURCES: test-resources

steps:
- name: Checkout Repository
- name: 🔧 Checkout Repository
uses: actions/checkout@v4

- name: Setup Node
- name: 🔧 Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodejs }}
cache: npm

- name: Install
- name: 🔧 Install
run: npm ci

- name: Run Tests (macOS, windows)
- name: 🔍 Run Tests (macOS, windows)
if: matrix.os != 'ubuntu-latest'
run: |
npm test
- name: Run Tests (linux)
- name: 🔍 Run Tests (linux)
if: matrix.os == 'ubuntu-latest'
run: |
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm test
- name: Upload Screenshots
- name: 💾 Upload Screenshots
uses: actions/upload-artifact@v4
if: failure() && inputs.nodejs != 'lts/*'
with:
name: screenshots-${{ matrix.os }}-${{ inputs.version }}-node_${{ inputs.nodejs }}
path: ${{ github.workspace }}/test/**/screenshots/*.png

- name: Upload Screenshots
- name: 💾 Upload Screenshots
uses: actions/upload-artifact@v4
if: failure() && inputs.nodejs == 'lts/*'
with:
Expand Down

0 comments on commit fbcadd4

Please sign in to comment.