Skip to content

ci: build script before e2e test #21

ci: build script before e2e test

ci: build script before e2e test #21

Workflow file for this run

name: Default
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-22.04
concurrency: lint
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Force correct branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Install Poetry
run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.12.6
cache: poetry
- name: Install Dependencies
run: poetry install --no-root --with dev --sync
- name: Lint Code
run: |
poetry run codespell `git ls-files "*.yaml" "*.yml" "*.md" "*.sh"`
poetry run yamllint --strict `git ls-files "*.yaml" "*.yml"`
poetry run mdformat --wrap 79 --number --check README.md
poetry run shellcheck `git ls-files "*.sh"`
test:
runs-on: ubuntu-22.04
needs: [ lint ]
concurrency: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Force correct branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Install Dependencies
run: ./bashdep.sh
- name: Run Tests
run: |
./lib/bashunit --parallel tests/first_time_setup/unit/**/*.sh
bash tests/first_time_setup/e2e/test_e2e.sh
release:
runs-on: ubuntu-22.04
needs: [ test ]
concurrency: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}
- name: Force correct branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Semantic Version Tagging
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "OpenFisca Bot"
git_committer_email: "bot+${{ github.sha }}@openfisca.org"
id: release
- name: Upload to GitHub Release Assets
uses: python-semantic-release/[email protected]
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}