feat: support ash (alpine) #433
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: Workflow for Codecov wrapper | |
on: # yamllint disable-line rule:truthy | |
- push | |
- pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: pip install -r app/requirements.txt | |
- name: Run tests and collect coverage | |
run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }} | |
- name: Upload coverage to Codecov | |
run: ./dist/codecov.sh | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
CODECOV_FAIL_ON_ERROR: true | |
CODECOV_FLAGS: flag1,flag2 | |
CODECOV_NAME: 'Ubuntu: Test''s "CI & Build" Job' | |
test-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: pip install -r app/requirements.txt | |
- name: Run tests and collect coverage | |
run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }} | |
- name: Upload coverage to Codecov | |
run: ./dist/codecov.sh | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
CODECOV_FAIL_ON_ERROR: true | |
CODECOV_FLAGS: flag1,flag2 | |
CODECOV_NAME: 'macOS: Test''s "CI & Build" Job' | |
test-windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: pip install -r app/requirements.txt | |
- name: Run tests and collect coverage | |
run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }} | |
- name: Upload coverage to Codecov | |
run: ./dist/codecov.sh | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
CODECOV_FAIL_ON_ERROR: true | |
CODECOV_FLAGS: flag1,flag2 | |
CODECOV_NAME: 'Windows: Test''s "CI & Build" Job' | |
test-alpine: | |
runs-on: ubuntu-latest | |
container: | |
image: alpine:latest | |
steps: | |
- name: Install dependencies | |
run: apk add --no-cache git curl python3 py3-pip gnupg | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create virtual environment | |
run: python -m venv .venv | |
- name: Install Python dependencies | |
run: | | |
source .venv/bin/activate | |
pip install -r app/requirements.txt | |
- name: Run tests and collect coverage | |
run: | | |
source .venv/bin/activate | |
pytest --cov app ${{ env.CODECOV_ATS_TESTS }} | |
- name: Upload coverage to Codecov | |
run: | | |
source .venv/bin/activate | |
./dist/codecov.sh | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
CODECOV_FAIL_ON_ERROR: true | |
CODECOV_FLAGS: flag1,flag2 | |
CODECOV_NAME: 'Alpine: Test''s "CI & Build" Job' | |
GITHUB_ACTIONS: true | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install shellcheck | |
run: sudo apt-get update && sudo apt-get install -y shellcheck | |
- name: Run shellcheck | |
run: shellcheck dist/codecov.sh --severity=error |