gparser: Implement get build date functionality #215
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test module | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python 3.8 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.8 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements_dev.txt | |
| - name: Install telemetry | |
| run: | | |
| pip install . | |
| - name: Configure sysctl limits | |
| run: | | |
| sudo swapoff -a | |
| sudo sysctl -w vm.swappiness=1 | |
| sudo sysctl -w fs.file-max=262144 | |
| sudo sysctl -w vm.max_map_count=262144 | |
| - name: Setup elastic search | |
| uses: elastic/elastic-github-actions/elasticsearch@24006c82ed2f0f1355fce96135f883acf1b1a889 | |
| with: | |
| stack-version: 7.6.0 | |
| - name: Ping elastic | |
| run: | | |
| curl 127.0.0.1:9200 | |
| curl localhost:9200 | |
| - name: Run tests | |
| run: SERVER="127.0.0.1" python3 -m pytest -v --cov=telemetry tests -k "not prod and not dev" | |
| - name: Report coverage | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: coveralls |