diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..82716ee --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +permissions: + contents: read + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + + env: + GVM_NO_GIT_BAK: 1 + GVM_NO_UPDATE_PROFILE: 1 + SRC_REPO: ${{ github.repositoryUrl }} + steps: + - uses: actions/checkout@v4 + - name: Before install + run: binscripts/gvm-installer ${{ github.sha }} tmp + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler-cache: true + - name: Run tests + run: |- + gem install tf -v '>=0.4.1' + rake default scenario diff --git a/Rakefile b/Rakefile index 40b6fc7..cb528d5 100644 --- a/Rakefile +++ b/Rakefile @@ -14,9 +14,9 @@ task :default do Dir.mktmpdir('gvm-test') do |tmpdir| system(<<-EOSH) || fail bash -c ' - set -e #{root_path}/binscripts/gvm-installer #{commit} #{tmpdir} source #{tmpdir}/gvm/scripts/gvm + set -e tf --text #{tmpdir}/gvm/tests/*.sh ' EOSH @@ -30,9 +30,9 @@ task :scenario do Dir.mktmpdir('gvm-test') do |tmpdir| system(<<-EOSH) || fail bash -c ' - set -e #{root_path}/binscripts/gvm-installer #{commit} #{tmpdir} source #{tmpdir}/gvm/scripts/gvm + set -e tf --text #{tmpdir}/gvm/tests/scenario/#{name} ' EOSH