-
Notifications
You must be signed in to change notification settings - Fork 5
33 lines (30 loc) · 1.26 KB
/
test.yml
File metadata and controls
33 lines (30 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
cache: 'pip'
# This is from https://github.com/elastic/elastic-github-actions/tree/master/elasticsearch
- 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
- run: "curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-amd64.deb"
- run: "sudo dpkg -i --force-confnew elasticsearch-7.2.0-amd64.deb"
- run: echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
- run: sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
- run: "sudo service elasticsearch start"
- run: pip install -r requirements_dev.txt
- run: coverage run --source='./grantnav' ./manage.py test -v 2 tests --exclude-tag=link-runner
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github