fix(cldr): use territory_from_locale for territory resolution #75
Workflow file for this run
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: Elixir CI | |
on: | |
push: | |
branches: | |
- main | |
- ci-test | |
pull_request: | |
branches: | |
- main | |
- ci-test | |
env: | |
MIX_ENV: test | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
elixir: [1.17.3] | |
otp: [25.3.1, 26.0.1] | |
name: Build and test | |
steps: | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} # Define the elixir version [required] | |
otp-version: ${{ matrix.otp }} # Define the OTP version [required] | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
id: mix-cache | |
with: | |
path: deps | |
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Cache deps | |
id: cache-deps | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-elixir-deps | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{ env.cache-name }}- | |
- name: Cache compiled build | |
id: cache-build | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-compiled-build | |
with: | |
path: _build | |
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{ env.cache-name }}- | |
${{ runner.os }}-mix- | |
- name: Install Mix Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Compiles without warnings | |
run: mix compile --warnings-as-errors | |
- name: Check Formatting | |
run: mix format --check-formatted | |
- name: Run Credo | |
run: mix credo --strict | |
- name: Run tests | |
run: mix test | |
- name: Run coverage tool | |
run: mix coveralls.github | |
- name: Generate docs | |
run: | | |
mix docs | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: doc | |
path: doc | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: doc | |
path: doc | |
- name: Force push to gh-pages | |
run: | | |
# Setup | |
cd doc | |
git init --initial-branch gh-pages | |
git remote add origin git@github.com:BartOtten/routex.git | |
git config user.name "Bart Otten" | |
git config user.email "bart.otten85@gmail.com" | |
eval `ssh-agent -s` | |
ssh-add - <<< '${{ secrets.GH_PAGES_SSH }}' | |
# Push | |
git add . | |
git commit -m "mix docs" | |
git push --set-upstream origin gh-pages -f |