Skip to content

Commit

Permalink
test: move tests to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kuisathaverat committed Jul 20, 2023
1 parent 7ab6e46 commit d51d404
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 15 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/check-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,75 @@ jobs:
go install github.com/magefile/mage
make -C ${{ env.BEAT_MODULE }} check update
make check-no-changes
unitTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
- name: unitTest
run: |
go install github.com/magefile/mage
mage -d ${{ env.BEAT_MODULE }} build unitTest
goIntegTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
- name: unitTest
run: |
go install github.com/magefile/mage
mage -d ${{ env.BEAT_MODULE }} goIntegTest
pythonIntegTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
- name: unitTest
run: |
go install github.com/magefile/mage
mage -d ${{ env.BEAT_MODULE }} pythonIntegTest
crosscompile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- uses: actions/setup-go@v3
with:
go-version-file: .go-version
- name: unitTest
run: |
go install github.com/magefile/mage
make -C ${{ env.BEAT_MODULE }} crosscompile
15 changes: 0 additions & 15 deletions metricbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ when:
tags: true ## for all the tags
platform: "immutable && ubuntu-22" ## default label for all the stages
stages:
unitTest:
mage: "PYENV_GIT_TAG=v2.3.22 curl https://pyenv.run | bash; PYENV_VERSION=$(cat ../.python-version); pyenv install $PYENV_VERSION && eval \"$(pyenv init -)\" && mage build unitTest"
stage: mandatory
goIntegTest:
installK8s: true
mage: "mage goIntegTest"
withModule: true
stage: mandatory
pythonIntegTest:
mage: "mage pythonIntegTest"
withModule: true
stage: mandatory
crosscompile:
make: "make -C metricbeat crosscompile"
stage: mandatory
macos:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
Expand Down

0 comments on commit d51d404

Please sign in to comment.