Skip to content

Bump actions/checkout from 3 to 4 (#686) #2277

Bump actions/checkout from 3 to 4 (#686)

Bump actions/checkout from 3 to 4 (#686) #2277

Workflow file for this run

name: CI
on:
push:
branches: [master]
tags: [v*.*, v*.*.*]
pull_request:
branches: [master]
pull_request_target:
branches: [master]
schedule:
- cron: 0 4 * * *
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
if: |
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') ||
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]')
steps:
- name: Checkout commit
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Install python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Cache packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py-3.9-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('setup.cfg') }}
- name: Install dependencies
run: make setup
- name: Login to ghcr.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Lint
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
make lint
- name: Run unit tests
run: make test_unit
- name: Pull test images
run: make docker_pull_test_images
- name: Run integration tests
run: make test_integration
- name: Build Docker image
run: make docker_build
- name: Upload image artifact
uses: neuro-inc/[email protected]
with:
image: platformstorageapi
token: ${{ secrets.GITHUB_TOKEN }}
release:
name: Create release
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: neuro-inc/reuse/.github/workflows/[email protected]
with:
image: platformstorageapi
helm_charts: platform-storage
deploy_dev:
name: Deploy on dev
needs: release
uses: neuro-inc/reuse/.github/workflows/[email protected]
with:
helm_charts: platform-storage
version: ${{ needs.release.outputs.version }}