feat: add test case and necessary functions for resource #149
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: build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
#needs: [test] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Setup | |
run: npm install -g semantic-release @semantic-release/github @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/git @semantic-release/release-notes-generator semantic-release-pypi | |
- name: Set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install setuptools | |
run: python -m pip install --upgrade setuptools wheel twine | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black ruff pre-commit | |
pip install -r requirements.txt | |
- name: Run linter | |
run: git diff --name-only HEAD~10 HEAD | xargs pre-commit run --files | |
- name: Run tests | |
run: python -m unittest src/tests/load_tests.py -v | |
- name: Release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
run: npx semantic-release |