Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test bot installation script on different operating systems
on:
push:
branches: all
pull_request:
branches: [ main ]

workflow_dispatch:

defaults:
run:
shell: bash

jobs:
test:
name: Test bot script on ${{ matrix.os }} with ${{ matrix.compiler }}.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [ g++-10 ]
include:
- os: ubuntu-latest
compiler: g++-10
target: Linux

- os: macos-latest
compiler: g++-10
target: Macos

- os: windows-latest
compiler: cl
target: Windows

steps:
- uses: actions/checkout@v3
- name: Run shell script
run: |
chmod +x install.sh
./install.sh

2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ while true; do
echo -e "\xE2\x9D\x8C please input your password to proceed so that the setup runs successfully"
echo

if sudo apt update && sudo apt install -y git gh curl nodejs npm; then
if type -p curl >/dev/null || (sudo apt update && sudo apt install -y curl ) && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y && sudo apt install -y git nodejs npm; then
echo
break
else
Expand Down