Skip to content

Commit

Permalink
Merge pull request #13 from FaithKovi/faith-ci/cd
Browse files Browse the repository at this point in the history
Create CI/CD pipeline to test installation
  • Loading branch information
kaxada authored Jun 26, 2023
2 parents e9cd086 + 8d89920 commit 2a6b262
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
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

0 comments on commit 2a6b262

Please sign in to comment.