Merge pull request #1074 from microbiomedata/1073-api-endpoint-descri… #1747
This file contains 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: Server | |
on: [push] | |
jobs: | |
client: | |
defaults: | |
run: | |
working-directory: web | |
name: Client Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
- run: yarn install --frozen-lockfile --network-timeout 300000 | |
- run: yarn lint | |
- run: yarn build | |
server: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: harmon758/postgresql-action@v1 | |
with: | |
postgresql version: '12' | |
postgresql db: 'nmdc' | |
postgresql user: 'nmdc' | |
postgresql password: 'nmdc' | |
- uses: actions/checkout@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Create environment | |
run: | | |
echo 'export NMDC_DATABASE_URI="postgresql://nmdc:nmdc@localhost:5432/nmdc"' >> .env | |
echo 'export NMDC_TESTING_DATABASE_URI="postgresql://nmdc:nmdc@localhost:5432/nmdc"' >> .env | |
echo 'export NMDC_MONGO_USER="${{ secrets.NMDC_MONGO_USER }}"' >> .env | |
echo 'export NMDC_MONGO_PASSWORD="${{ secrets.NMDC_MONGO_PASSWORD }}"' >> .env | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox tox-gh-actions | |
- name: Test with tox | |
run: tox |